奈姆
Hello, I made register and login view with endpoint using JWT. I add refresh_token to httponly cookie once logged in. How can i delete that cookie once user logged out? When I'm trying to use response.delete_cookie("refresh_token") it just adds new cookie with an empty string https://pastecode.io/s/mtqcne6f
https://github.com/django/django/blob/2ee6ca6d35f667c54cba7efacccee3b9f178a6e7/django/http/response.py#L285 response.delete_cookie() set the cookie to expire (1970-01-01). When cookie is expired, browser will no longer send it to server. To clean up the expired cookie, it is up to the browser implementation.
TAREEQ🐾🌱 🥠Σ
I’m having an error when trying to run one small project in Django and I have cross-check all my codes are set correctly
TAREEQ🐾🌱 🥠Σ
Bright
Is it having the requirements file
Charly
Is it having the requirements file
So you'll try any possible issue instead of asking for the errors?
Yuldashvaev
I created a project with django and Postgersql. But because there is a lot of data in the database, the system is having difficulty calculating, so I am waiting a lot. How can I speed this up as much as possible? I thought about using cache, but the data is updated frequently, so the cache was not suitable.
Saturn
Hi Everyone, can anyone suggest to me one full fledged course for Django framework. I found many but couldn't select one.
Doragonsureiyā
Hi Everyone, can anyone suggest to me one full fledged course for Django framework. I found many but couldn't select one.
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
M...
Hello everyone, can you tell me how to solve this problem ValueError: Field 'id' expected a number but got 'DefaultService'.
Doragonsureiyā
Hello everyone, can you tell me how to solve this problem ValueError: Field 'id' expected a number but got 'DefaultService'.
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase.
شهرزاد محمد
I am using django-allauth for authentication using dj-rest-auth. I use SITE ID URI ( localhost:3000 instead of 127.0.0.1:8000 ) in the password reset URL sent to the email. Example email Hello from site1! You're receiving this e-mail because you or someone else has requested a password for your user account. It can be safely ignored if Adarsh did not request a password reset. Click the link below to reset your password. http://127.0.0.1:8000/password_reset_confirm/confirm/1/aq5fn k-3b3e79e8b9a8df4f3eb3c9b1cba4d946/ Thank you for using site1! localhost:3000 but link domain is 127.0.0.1:8000, how change to :3000
MPk
What's the error
NoReverseMatch at /dj-rest-auth/password/reset/ Reverse for “password_reset_confirm” not found. Not a valid name. When I go to the end point I’m given the chance to enter my email but when I post then this comes
شهرزاد محمد
NoReverseMatch at /dj-rest-auth/password/reset/ Reverse for “password_reset_confirm” not found. Not a valid name. When I go to the end point I’m given the chance to enter my email but when I post then this comes
#urls.py from dj_rest_auth.views import PasswordResetConfirmView path( 'auth/reset/confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name='password_reset_confirm', ), #settings.py ACCOUNT_CONFIRM_EMAIL_ON_GET = True ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = None ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = None
Aнтон
Hi guys! I have a question about creating an internet-shop on django. Could you recommend what kind of base, i need to use and from what it depends?
Aнтон
The goods will uploade manually or from excel
nyctophile
Hi there! Can you guys take look at my settings.py https://hastebin.com/share/ivuwawaduh.python I am having problem with cors headers, i am allowing everything to everyone and still frontend application getting cors error:
clouded
what do you mean, what is wrong ?
Line 25 should be enabled according to the documentation of django-cors-headers.
nyctophile
Line 25 should be enabled according to the documentation of django-cors-headers.
thank you, 😅😅, i have been having this error for half day now,
Стас
Hi all, can you please tell me why drf spectacular asks for superuser password and login everywhere when I access the backend endpoint from the frontend? in the terminal it is djangoapp | Unauthorized: /api/chat/get_chat_titles_by_history_id djangoapp | [10/Jan/2025 13:42:17] “GET /api/chat/get_chat_titles_by_history_id?history_id=e0515c5a-a8a9-4344-b60f-0c20af238846 HTTP/1.1” 401 39
Ola
hello i am new to django , while trying to deploy my app with gunicorn it keeps saying module myproject.wsgi not found
Alessandro
where you doing your project? windows...Debian...
Akjrvv
Hi I can't resolve an issue with django-debug-toolbar: whenever I click on any tab in it, I get a 404: Not Found error. The installation was done strictly following the documentation, and I double-checked everything several times, but the problem persists. Previously, django-debug-toolbar worked fine, but at some point, it broke, and the 404 error appeared.
Nikita Goncharov
hello i am new to django , while trying to deploy my app with gunicorn it keeps saying module myproject.wsgi not found
Hi, myproject it is a directory where placed you wsgi.py file, you need to change it with own dir name
Mahfuzur
Can anyone suggest a beginner to advanced django course?
Doragonsureiyā
Can anyone suggest a beginner to advanced django course?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Shubhtiwarii
localhost/:1 Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/register' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. App.js:65 Registration request error: AxiosError {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} overrideMethod @ hook.js:608 (anonymous) @ App.js:65 Promise.catch submitRegistration @ App.js:63 callCallback @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 App.js:49 POST http://127.0.0.1:8000/api/register net::ERR_FAILED
Shubhtiwarii
localhost/:1 Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/register' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. App.js:65 Registration request error: AxiosError {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} overrideMethod @ hook.js:608 (anonymous) @ App.js:65 Promise.catch submitRegistration @ App.js:63 callCallback @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 App.js:49 POST http://127.0.0.1:8000/api/register net::ERR_FAILED
Please help me to solve this error
Nikita Goncharov
Please help me to solve this error
Read info about CORS and how it works
Alisher
Can you suggest where I can learn DRF?
clouded
Can you suggest where I can learn DRF?
I'd start on the DRF website.
Alisher
I don’t really enjoy reading documentation, but my friends say it’s the best skill for a programmer. Is there a website with simple documentation on any topic to help me start getting into the habit of reading it?
clouded
I don’t really enjoy reading documentation, but my friends say it’s the best skill for a programmer. Is there a website with simple documentation on any topic to help me start getting into the habit of reading it?
There is no single website for any topic to help you start getting into the habit of reading. Just start reading and start reading the right things. If you don't know Django, read the Django docs first (which includes doing their tutorial, if you haven't). Otherwise read the DRF docs.
Alisher
Thx
Charly
is there jwt here?
What if you click it to know it?
Synthwave
is there jwt here?
https://www.django-rest-framework.org/api-guide/authentication/#json-web-token-authentication
Synthwave
Hello everyone. Who can tell me: in which sources (documentation/video) can you understand DRF authentication well? Preferably using the dj-rest-auth library, but other libraries are also possible.
amariah_and_amaris
Hello everyone. Who can tell me: in which sources (documentation/video) can you understand DRF authentication well? Preferably using the dj-rest-auth library, but other libraries are also possible.
To learn DRF Authentication (especially with dj-rest-auth): Dive into the docs: The official dj-rest-auth documentation is your best friend. Watch tutorials: YouTube has tons of helpful videos. Practice, practice, practice: Build small projects to solidify your understanding. Key Concepts: Authentication: Verifying who a user claims to be. dj-rest-auth: Simplifies common auth methods (JWT, OAuth2, etc.).
amariah_and_amaris
I have read off docs, and it is very weak
Many libraries, including dj-rest-auth, have a ReadMe file on platforms like GitHub. These often provide a concise overview and quick-start guides.
.terrri
Can anyone suggest best Udemy course for learning django
Dev
Is there any djnago tutorial to learn it from zero...? If anyone has a good source,please provide.
Dev
I want to learn it from scratch.
Dev
CS50 django
Appreciated 👍 thanks men.
Doragonsureiyā
Is there any djnago tutorial to learn it from zero...? If anyone has a good source,please provide.
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
clouded
who knows more better free courses?
What are vetter free courses?
Maxim
who knows more better free courses?
did you mean better or best? if you did, then that's what these are
Binance
I have been trying to host a django application on a windows server using the mod_wscgi module for apache but the application is unreachable. Anyone who migh be able to help
Nishanth Siraj
Hi guys , I have a doubt. Like for chunk upload should I use sockets , any socket like Daphne or django channel?, any suggestions please. There are no tuts online and django chunked upload pips are deprecated. I like to have your opinion on procedure to do this please. Thanks in advance
Abraham
hello guys how can i set a django dropdown list required...?
The Notorious
Angel
In a view I have to make a database query after several "chained" functions, I wanted to avoid having to pass the user id as an argument in each function, is there any alternative? to get the user id without it being through an argument
Angel
to save me a parameter, just for that
Charly
to save me a parameter, just for that
Do you get billed by parameter or why you want to avoid that?
Charly
I men you could write a complicated context manager or other crazy stuff but that may be worse at the end
Nikita Goncharov
to save me a parameter, just for that
Can you explain working scheme of this feature ? Like which user(logged in/log logged in), what do you do with it in chaining functions and etc
Angel
Can you explain working scheme of this feature ? Like which user(logged in/log logged in), what do you do with it in chaining functions and etc
It's a long explanation but I understand where you're going with this. I thought it wasn't usual to do it this way. Thank you both.
Alexander
Hey guys, please advice I need to create a simple Django app. I have to track all changes in DB and in case of field updating, I have to store all previous data. In which way is it better to implement?