None
(Not complaining, just want to understand)
I would think about operational system level of connection between python and database
Mirco
Can someone explain or point me to an article as to why Django 3's ORM is not async complient? I dont get that at all...
I have not so many info because I didn't have the time to read the DEP in a focus way, but as far as I know , currently it's just too complicated to have also the ORM async
Mirco
You can read the DEP of Andrew Godwin to have all the details about it Here
Anders (izzno / gooood) 🇳🇴
I did and they don't mention that. It's like the elefant in the room...
Anders (izzno / gooood) 🇳🇴
It's strange, in flask you can just dropp gevent and all your views are async... But Django has this awesome admin but you can't make it async (other than more instances)
Anders (izzno / gooood) 🇳🇴
What should I set instead of xxx?
The python path to your settings.py file Usually your project/folder name
None
I don't understand.
https://stackoverflow.com/questions/14829817/do-django-orm-database-queries-block-the-server-or-are-they-asynchronous
tom
What should I set instead of xxx?
u need get it from manage.py
tom
u can find the same code in this file
Anders (izzno / gooood) 🇳🇴
Unless you run multiple instances of your wsgi server it will only handle one at a time.
Anonymous
The python path to your settings.py file Usually your project/folder name
settings.py's path? i have written the above code in setting.py file
Anders (izzno / gooood) 🇳🇴
Anonymous
Anders (izzno / gooood) 🇳🇴
what?😳
Compared to you project root folder
Mirco
It's strange, in flask you can just dropp gevent and all your views are async... But Django has this awesome admin but you can't make it async (other than more instances)
Yes, but I think the ORM stuff is very complicated to handle in the async way I think it will come but maybe not into this 3.x version
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
Don't get me wrong, I love Django for the right projects. But if I don't need an admin interface I don't use it. Async could change that (I think) for so many
Anders (izzno / gooood) 🇳🇴
In fact if manual punching is needed, I don't get why anyone would choose different...
Anonymous
!ol
Doragonsureiyā
Amharic @python_amharic Arabic @arabipython Armenian @pyerevan_chat Azerbaijani @azepug Chinese @pythonzh German @pythonde Hebrew @pythonisrael Indian NEW @pythonIN Indonesian @pythonid Italian @python_ita @pythonita Kazakh @python_kz Persian @pyfarsi Portuguese @pythonbr @pythonrio Russian @ru_python_beginners @ru_python Spanish @PythonEsp @PythonEnEspanol Turkish @python_tr Uzbekistan @python_uz Vietnamese @pythonvietnam
Anonymous
English only please. Else go to @ru_python
Oleksii
OOO, im sorry did not notice at all😂
Mirco
I agree 👍, but then what's the wow factor of 3.0 🤔
Added the first very async support to Django middlewares, views etc. etc. And keep sync backwards compatibility It's the very start of a journey that will bring our lovely framework to be fully async and build better and powerful stuff
Manish
Hello everyone.. I am new to django.. I am configurating django in pycharm Django is installed but I could not run manage.py file
Manish
Anyone can help??
Manish
I am trying it on linux
Anonymous
Hi whats the error u r getting?
Manish
Thank you its running
Anonymous
oh cool
Manish
I was trying python manage.py runserver But actually its ./manage.py
Manish
Haaha in linux its different
Orack
Forbidden (CSRF cookie not set.): /upload/ [24/Nov/2019 12:55:52] "POST /upload/ HTTP/1.1" 403 2868
Sávio
Good afternoon guys, I'm using django a little while does anyone know a way to start a service inside the server through the Django application?
Manish
I am in odoo I want to move on django so I am doing self learning
Orack
Forbidden (CSRF cookie not set.): /upload/ [24/Nov/2019 12:55:52] "POST /upload/ HTTP/1.1" 403 2868
I'm getting this when using django-rest-framework, but If i add .as_view() it doesn't show this, unfortunately one stackoverflow code doesn't use .as_view() so how do I bypass that
Ghorz
Sorry mu english is horrible
Make debug=True, read the traceback from the browser
Orack
Add {% csrf_token %} to your form
its not a form, djangorestframework
Ghorz
its not a form, djangorestframework
Override the permissions
Oğuzhan
Guys I want to make my first microservice along with my monolithic Django project. My question is that how can I make a communication between my Django project and my billing system(microservice). What I meant is that I have a Django rest framework based backend where users can communicate with server via JWT. I want to make a microservice which make billing process. But my question is that user after logged in the system using django rest frameworks jwt token. How can I make some process with this user on microservice? I am really confused.
Ghorz
Override the permissions
Override sessioAuthentication
Manish
I coul not create the connection to the localhost:8000 or 127.0.0.1:8000
Oğuzhan
Probably if i try to decode jwt token with Django secret key I can get the user id so I can use it.
Manish
I coul not create the connection to the localhost:8000 or 127.0.0.1:8000
Now its worked. Thank you.. I have just added 'localhost' , '127.0.0.1 in allowed hosts list
Shaikha
Has anyone worked with DRF and websocket? I wanna make a messaging app, where do I start
Amen
And lots of awesome Medium tutorials check out the blogs
Jose Luis
what recommend me to filter in multiple fields? is OK just to use a filter with multiple OR? Create a custom filter using Q objects?
J🤖xes
J🤖xes
nginx log
J🤖xes
site="localhost" server="xxxx.xxxxx.es" dest_port="8000" dest_ip="xxx.xxx.xxx.xxx" src="xxx.xxx.xxx.xxx" src_ip="xxx.xxx.xxx.xxx" user="-" time_local="24/Nov/2019:18:03:15 +0100" protocol="HTTP/1.1" status="502" bytes_out="173" bytes_in="0" http_referer="-" http_user_agent="-" nginx_version="1.15.3" http_x_forwarded_for="xxx.xxx.xxx.xxx" http_x_header="-" uri_query="-" uri_path="/payments/refund" http_method="POST" response_time="0.860" cookie="-" request_time="0.864" debug="SlphdXE4RGc3dVVEVE9QUUxTTDhXMmlHalRLdDFia2dnYWlDcmNlNGQ0dElkdWx1MkZyTTJXUU50WUNNSkRWc3JEYnYzaW5zZXJKS1B4R2d\ 3VnB5NFVrK082TXN5QVJMc3hwQnpiUEVWN3B5U1p0QmUrRlFsSEVQN0RUdXhZWFhRTGkzbmJ2ZzNKQ0ZJTGowRDRmeVR6enlsZ1FsZVUzbStRYmdy\ bER6NjAyZ3FPek9oajNrUWhkT2RtWVQ2T2RGS2wvQlpmeXlLMFFHVm5pc0sxK1NBOXRjUEtrLzVzQzRzNXdGb0ZlS2Z6TXcyN3JKeFVKZVJBY1g1O\ WY5eTJqdDlLa24vbnZsRWgyVk9RWk5qNDlhR2hGeCtaYkJoUGN5MUVkV09yRm5yNytTR3p5SG5kbmhJejZIM3g5emtIcm1JK2QvcHNVNk1xYmNWVG\ 5WeWNTeDdnPT0"
J🤖xes
Debug is a cokkie with encripted information about the transaction
Денис
I'm getting this when using django-rest-framework, but If i add .as_view() it doesn't show this, unfortunately one stackoverflow code doesn't use .as_view() so how do I bypass that
if you use a function-based view, then wrap it with decorator @csrf_exempt. import it with from django.views.decorators.csrf import csrf_exempt Basically, you shouldn't do that unless you really want your API requests to be unauthorised and unsafe from cross-site scripting. For class-based views read here.
Денис
but I have different example of drf where I didnt do any login neither used csrf_exempt that didnt throw up this error
As far as i know, CSRF token works slightly different in DRF than in Django itself. Generally CSRF token isn't required when there's no user data in the request.
Mirco
As far as i know, CSRF token works slightly different in DRF than in Django itself. Generally CSRF token isn't required when there's no user data in the request.
When building APIs with DRF, CSRF token is being sent by the client using the X-CSRF header for example If you keep default auth classes or when adding the Session one
Vachagan Muradyan
DJANGO освобожденный
Anonymous
How to mine web and extract images and title and pass it to template???
Anonymous
No one is thr?? That's so sad...
Rajat
Hello guys, I am stuck in a problem in django ... The problem is on this link.. https://stackoverflow.com/questions/59005210/how-can-we-compare-two-objects-in-python-contents-of-the-data-with-sql
Rajat
Please help me with this problem
Денис
How to mine web and extract images and title and pass it to template???
These are two different tasks. Probably you shouldn't force Django to parse webpages. There should be a standalone program/module/script fulfilling this task and saving required information in the DB. All you need from Django then is to take this DB data and pass it to template which is trivial after you've passed a couple of tutorials. Just keep in mind DB consistency in terms of what two different modules - parser and Django - read and write to a single DB.
Sachin
Hello everyone Plz help ...I was creating a simple login project ... The project will run But when I try to register it shows this error👇👇
Sachin
Page not found ...
Sachin
Check for typos or address of template
What do you mean by typos ...
Sultonbek Ikromov
What do you mean by typos ...
give the path of your registration correctly
Sultonbek Ikromov
there might be typos
Sultonbek Ikromov
maybe you dropped some letter
raven
Hello everyone.Could you suggest a book for imroving Python/Django skills?
Two scoops of django. Django for professionals . Django by example.