Suraj
profile contain my userid as foreign key
Suraj
I want after deletion of user .. every row in my database which contain user id as foreign key will get deleted
Suraj
flask-sqlalchemy ?? anyone can help?
Suraj
Sorry again it's not a django question but both are pretty same. Please
Suraj
help
Muflone
who told you they're the same? django has the specification for foreign key deletion
Batman
help
you should probably ask that in a python group instead
Suraj
who told you they're the same? django has the specification for foreign key deletion
I know but django is inspired by flask so we all should respect flask.
Batman
lol
Muflone
this won't make any sense, pal
Anders (izzno / gooood) 🇳🇴
The simplest way to get http://mydjangosite.com/ <—- as media.url only displays "media/mymedia.media" ...
Anders (izzno / gooood) 🇳🇴
?
Ghorz
In these microservice days, my Django app is getting pretty complicated. I don't know if I would do the same all over. Mainly (or only) to get help / set someone in this project is a lot of moving parts.
Microservices has its use case. The reality is Django works for a project that will eventually grow. What I do often is write functions I may regularly use e.g permissions, data filtering, call it when ever I need it in my apps.
Ghorz
Sometimes you find yourself repeating codes over and over
Anders (izzno / gooood) 🇳🇴
Sometimes you find yourself repeating codes over and over
I rarely have that problem... Then I will write a class or function taking care of it.
Ghorz
I rarely have that problem... Then I will write a class or function taking care of it.
I like django code structure and apps separate. If you look at laravel or codeigniter, you'll notice everything gets garbaged in a controller folder
Ghorz
You have to open each controller file to find the code you want to edit. In django, you already know the app, the file you should look for
Anders (izzno / gooood) 🇳🇴
Im sorry but I have no idea what youre talking about. I'm sure laravel is nice but I never liked php so i never went passed the intro toturials...
Anders (izzno / gooood) 🇳🇴
I hear laravel is nice 👍... But I have no idea 😂
Anders (izzno / gooood) 🇳🇴
(if I need to one day I will learn it)
Anders (izzno / gooood) 🇳🇴
And by this is mean no disrespect.
Shaun
@izznogooood Ghorz is agreeing with you. Django is superior structure. You are just talking about two different ways to reuse (reuse via code and reuse via microservice)
cj
You can test Django 3 now 😊
can you? 😱 I have to take a look 😮
Muhammed Enes
Hello to everyone. Can I integrate an admin panel I received from the envato market to the django admin?
Remy
Yeah laravel is great, and that is not good for Django, especially since PHP is way faster than python :/
Germinate
how do i link my webapp to milestone? i need to send queries to milestone to retrieve some video playback
Germinate
i am using javascript to display the videos as i need to use a lightbox for the display
Remy
I didnt know about this awsgi thing and the fact that Django 3 will be async. Does it means that we wont need celery for asynchronous task (other than periodic tasks) ?
Ratana
How to transfer databaes from google cloud to digital ocean?
Abdulakhad
https://api.telegram.org/file/bot<token>/photos/file_12.jpg how to save it to jango database. photo from a telegram bot
Anonymous
How to transfer databaes from google cloud to digital ocean?
dump it as SQL statements and run it as SQL statements
Денис
https://api.telegram.org/file/bot<token>/photos/file_12.jpg how to save it to jango database. photo from a telegram bot
Any way you like. There's FileField to store a file. There's URLField to store a URL. Or even a CharField, but URLField has validation for URLs.
Денис
https://api.telegram.org/file/bot<token>/photos/file_12.jpg how to save it to jango database. photo from a telegram bot
but if you want to use this image in the bot itself only, then you'd probably prefer storing file_id in the database, because the best way of sending an image in telegram is to use its file_id as the image is already stored on Telegram servers
Денис
and thanks for the idea. I didn't think of integrating Django and python-telegram-bot, so that I could use DJango ORM for PTB and also build a website on what data the bot gathers
Денис
but does Django ORM work separately? If I just import django.db.models, how is it configured without any settings file?
Денис
Looks like it's the answer. Nevermind.
Ghorz
Hello to everyone. Can I integrate an admin panel I received from the envato market to the django admin?
What kinda admin, if its admin panel not tailored for django, you can use it but not as a replacement for django admin. I specifically use adminlte.io for my django projects.
Muhammed Enes
Thanks
Ihor 🐈
Could someone explain me briefly? If i have code like this: >>> foobar = Foobar.objects.all() >>> filtered_foobar = foobar.filter(<...>) >>> print(filtered_foobar) does DjangoORM understand it like one SQL query with a WHERE clause? I realize that querysets are lazy in all, but what the query (or queries) exactly would execute at third row when i printing that?
Maksim
filtered_foobar = Foobar.objects.filter()
Андрей
print(filtered_foobar.query)
Андрей
This command will show you SQL query to db
Денис
take a look at this https://github.com/JungDev/django-telegrambot
you made my day! Does it work as python-telegram-bot?
Batman
you made my day! Does it work as python-telegram-bot?
I haven't used it, but it seems to be an extension over ptb, so yeah it should work
Денис
I haven't used it, but it seems to be an extension over ptb, so yeah it should work
It has ptb in requirements, okay. But it's sooooo outdated
Денис
3 or 4 years
Batman
3 or 4 years
yea, but last commit was 9 months ago, and requirements state django 1.8, you can give it a try, or open an issue to ask the maintainer about it
Anonymous
S3 service I am using
Anonymous
And getting the error
Anonymous
While using Amazon aws S3 service in Django... I getting the following errors.. The authorization mechanism you have provided is not supported . please use AWS-HMAC-SHA260
Manik
Suggest open source CVS
S
And also write on settings.py and be careful with cross-site and policy writing on s3
Anonymous
Images from my AWS Bucket not showing on my website
Anonymous
It will upload to S3 bucket success fully but not showing in my website
Anonymous
It didn't know what I do?
Anonymous
Hi
Anonymous
Hi friends I need one help Can you suggest me any free server providing platform where i can deploy my django project.
R
my god! thank you for having this group! I am having a problem, I think it is basic. But I have been banging my head all day. The only issue is that under contract I can’t share code…
R
but PLEASE let me try to ask for help: The issue is that the code I am working with is written for older version of django, and python 2.7. It really doesnt work, so I am trying to update it and get it to work. I have the project urls pointing to include the app urls urlpatterns = [ path('admin/', admin.site.urls), path('', include('registration.urls')) ] no errors, no issues the app urls works too. It calls the index.html page just fine. That page has login stuff on it. When you press the “login” button I can see in the address it goes to http:///correctaddres:8000/login but it does not call the login function in the views.py file. Can anyone think of places to look as to how to fix this. I am sorry I can not post code
Anders (izzno / gooood) 🇳🇴
When using signal: post_save i am trying to access a newly added manytomany relationship on the instance, but this is empty unless it had data before the update/save. How do i access updated data?
Anders (izzno / gooood) 🇳🇴
Apearanly m2m relationships are saved in a different operation...
Eduardo
Hi guys, if I gave a database of products, how can I allow to user add info not from admin page but a view, where could I find information, thanks in advice.
Batman
anyone else currently using heroku for deploying Django 2.2 projects, and having issues with the django-heroku package?
Belmo NaTazu
Hi. How to get context in post method? I use Template View
Maz
Anyone scaling their web app using a containerized Kubernetes environment?
Remy
Hiroku, aws, GAE,
Are you sure AWS is free?
Remy
Anyone scaling their web app using a containerized Kubernetes environment?
Nope, frankly I would consider it twice before jumping into kubernetes, if you are really big, then ok, but sounds like overkill stuff for most people needs