Muflone
You're welcome
Muflone
23.6.666
if i remove this from main urls.py how can ı access admin panel
Muflone
23.6.666
aaa you say it should be in main urls.py ?
Muflone
exactly
23.6.666
thank you youre really god person
23.6.666
****good person
Muflone
no, I'm not
I'm a teacher, I want people to learn, I don't want to solve their tasks
23.6.666
thank you so much
Asukhan
guys, hi again, can you please tell me one more thing, in Django-created website, in my storage cookies there's a cookie named like "crsftoken" and ofc the value of it. but I see, that every Django-created website instead of "crsfroken" has the name "sessionid", so why would I have a "csrftoken" one?
Muflone
Muflone
csrf is used to avoid other people to use your resources without being on your website
session_id refers to the currently logged user
Maxim
Charly
23.6.666
order.html is inside hello/templates/hello/order.html and
urlpatterns = [
path('admin/', admin.site.urls),
path('newyear', include("newyear.urls")),
path('', include('hello.urls')),
path('home',include('order.urls'))
]
is that correct ?
23.6.666
its main urls.py
Muflone
Muflone
you're confusing templates with routes
23.6.666
it was a little bit difficult but ı am reading now
Muflone
close telegram and study seriously
your project actually is entirely irrelevant, study the basics first
23.6.666
okay
Muflone
the django tutorial has it
motasim
How add the statics in my admin jazzman
Please help...
Dambek
Hi, how do I can validators for models, like, if student in group, I can't add him in other group, I use Many to Many field
Leonardo
Dambek
Dambek
And in 1 group can be a lot of students
Leonardo
OneToMany
Leonardo
One Group to Many Students
Leonardo
Dambek
Rajan
Hey everyone I am using django backend and next js frontend. So when I make my first req and that is post req for signup csrf token validation failed error occured. Can anyone help me with it
Rajan
Please help me with this asap
Maxim
Doragonsureiyā
This is neither a job board nor a bulletin board.
ㅤ
Doragonsureiyā
Okey
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
Freddy
Django restframework
Doragonsureiyā
Vorke
Hello guys, I have a Django web app (django templates) hosted in Django, issue is on first time load (i.e. after restarting gunicorn) the page takes very long to load.
Strange part is that queries run under 1 second, but page can take upto 5 minutes to load.
What could be the issue?
Maestro 🏀
Can anyone help me with this issue? Thanks a lot and sorry for the ignorance but I'm stucked with this problem for 3 days
https://stackoverflow.com/questions/77086719/troubleshooting-a-django-collectstatic-error-after-upgrading-to-version-4-2
Sk
Alex
Rajan
Naggafin
Frontend framework
you have chosen a hard path my friend. because the backend and frontend code bases are decoupled, the best way to accomplish this is to, at a point in your template that django does have control over (inside the <head> tag for example), include {% csrf_token %}, then from inside your JavaScript, you search for that element with csrf_token = document.querySelector(input[name='csrfmiddlewaretoken']).value;
Naggafin
django does not work very well with heavy handed frontend frameworks which decouple the codebase from the back end. if you are just starting out in your project, and you have time to learn, I would highly recommend you use htmx instead for your future sanity
Rajan
Naggafin
if that is the case, then it would likely be most beneficial for you to use django REST framework to create an API like your frontend expects
Rajan
Naggafin
DRF doesn't require csrf token validation. instead you can do JWT auth for example
Rajan
Naggafin
Naggafin
Bandar
Hi 👋
What is the best asynchronous protocol handler in Django ?
Best =
Easy to use
Mature
Less configuration
Easy to integrate
Bandar
Answer will be much appreciated
Bandar
🙄 I went through the docs before I came here
Bandar
Thank so much though 🤍
Bandar
Django suggests channels and I’m thinking about Starlette due to versions conflict
Bandar
Am I doing the right thing 😵💫?
Bandar
Bandar
Thank you 🙏
Bandar
In this case do you still use channels.generic.websocket in consumer.py ?
Bandar
Thank you 🙏
我乃荣大
What can you do with Django as a backend for telegram bot
I want to ask about the migrations in django because i have met some bugs while i use makemigrations and sometimes i can fix it and sometimes not. In the offical document, it only talk about the use about migrations but i want to find some about the best practice about migration, which may include what should i do and should not do in models.py. Is there some blog or article about this?
Ahmad
Alex
Heast
How to disable username and password save in browser
⟨ Simon |
Heast
it will disable only in one application usage
Hello friends
When I run Django with ASGI and uvicorn, inside the async views, I open an async loop with asyncio.gather, then when it reaches this line, the program becomes very slow and takes 2-3 seconds to respond.
But when I run the project with WSGI and gunicorn, it is ok and there is no problem with asyncio.gather.
In general, I want to make a request to two addresses at the same time and receive their response in a sync view, how can I implement this correctly?
I am using Django 4.1.
Dj - 505
I have a django project for a small coffee shop and I would like to try it as a simple commercial website with online payments with postgresql database .
Which the best server should I choose with an economical price ?