Jean-Yves
https://www.toptal.com/developers/hastebin/igopupuleh.py
Jean-Yves
i want to show you the view and the model.
It's two parts different
Umut
https://stackoverflow.com/questions/71131520/django-admin-404-page-display-error-unable-to-find-return-page-when-data-is-ins
Umut
Abdikarimov Farhod
hi i need help with jango muomo is that there is an admin section and there is a staff section now the work done by the staff should not be visible to another employee this is how can i
ꜱᴀᴇᴇᴅ
Hello, how can I put the phone number receiving field in the models and send an SMS to the number taken from the user to login to the site, can anyone help me? 🤔
Дмитрий
can you help me about my problem
I see three possible scenario:
1) db is not connected (and/or migration undone)
2) view for admin action is not created/uploaded
3) question to permission/token
Umut
Дмитрий
ꜱᴀᴇᴇᴅ
Alex
ꜱᴀᴇᴇᴅ
How can I edit the Django username field and filter the # £ _ & /?! * Characters so that if the user enters these characters in the username, they will give an error
Alex
ꜱᴀᴇᴇᴅ
ꜱᴀᴇᴇᴅ
Alex
Thank you, can I use the django-sms package or not? 🤔
It doesn't look like a well supported package. Be in your place, I would rather write my own wrapper for such API. If you are curious, here is a patter for that
https://martinfowler.com/articles/gateway-pattern.html
ꜱᴀᴇᴇᴅ
jolli
hello all.
I am working with templates folder.
my error is template is not exist.
I have Included the app in installed apps.
can any one help with that.
Najim patel
queryset = queryset.filter(and_(Template.start_dt <=Template.start_dt, Template.end_dt >=Template.end_dt, Template.status==1)).order_by(Template.end_dt.desc())
queryset = queryset.all()
Najim patel
Najim patel
How I can understand
My query is wrong or correct
Sp
Alex
Najim patel
Alex
This is flask query
There is no such thing as a "flask query". I think it's tortoise or gino orm
Najim patel
Kiran
Access to XMLHttpRequest at 'http://127.0.0.1:8000/accounts/login/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Alex
Kiran
Najim patel
Kiran
i am newbie in django,i put "CORS_ORIGIN_WHITELIST = [
"https://localhost:3000"
]" in settings
Xerena🦋
Kiran
Anonymous
http://localhost:8000/python_learning/7/3/page
this url path giving error, how can I filter the old id from the return url
Anonymous
http://localhost:8000/python_learning/7/3/page
Anonymous
Page not found (404)
Request Method:
GET
Request URL:
http://localhost:8000/python_learning/7/3/page
Using the URLconf defined in python_learning.urls, Django tried these URL patterns, in this order:
Anonymous
this is my urls.py code
path('<int:id>/page',views.page,name='page'),
and my views.py code is
def page(request,id):
id1=str(id)
return render(request,'user/a'+id1+'.html')
I am try to go to next page, from the already render page, but there I am getting a error
the error is:
Page not found (404)
Request Method:
GET
Request URL:
http://localhost:8000/python_learning/7/3/page
Using the URLconf defined in python_learning.urls, Django tried these URL patterns, in this order:
I am using same path and function for render next page
but I got this error
tell me how to remove the old /id from the return request url… please
M
Hi guys as I have been freaking out for 2 hours, I appeal to your goodwill. I can put variables like STATIC_URL, MEDIA_ROOT and MEDIA_URL inside the .env file (I use django environ) ?Because at the moment I'm not succeeding.. If you could give me a hint please:(
Swayam
Mirco
M
Thx guys
M
Resolved issue
Брат
Why Model.objects.all() is not a single query? I mean it depends how much objects inside of it. For instance if there are 5 objects then, Model.objects.all() will query 6 times not one...
Fan / Ac
Брат
You can check it yourself in python shell
Брат
or in django toolbar
Hossein
Fan / Ac
He might be accessing foreign key in the query
Брат
Брат
Im using many to many field in this model
Брат
What I can do about it?
Fan / Ac
check select_related()
Брат
prefetch_related() doesn't help
Брат
check select_related()
omg, I didn't notice, that I have a OneToOne relationship either, it worked for me thx!
Fan / Ac
Rohit
Hello Everyone
can we write a script to turn api’s on when system reboots ?
Sam
Rohit
Sam
Alex
Hi guys I use django&gunicorn&nginx for deploy and have a problem with celery-progress - progress-bar doesn’t move, while jobs are executing fine (200 response, status pending).
When I use celery-progress with dev settings everything works fine (settings do not include nginx and gunicorn)
What can be the problem?
samkit
hi guys i just started learning django
cannot really understand how MVC works?
any suggestions
Jitendra Kumar
cj
also Django doesn't "support" MVT... Django has it's own pattern, which is Django
cj
go read about that in the official documentation
Lokdai
Hey guys i wish you all are doing well,, i have a problem here in login page when i login with the right username an password it shows me inviled info rather than redirect me to home page
Arshia
Hi guys
To work in the backend, we need to make changes in the design of the site??
Брат
How can I add an object in manytomany field withing 1 query? It tooks me somehow 4 queries to do so:
getting_model = Model.objects.get(id=id) # +1 query
getting_model.friends.add(AnotherModel) # +3 queries
Arshia
Anshu