Abhie
Abhie
Line 120
Charly
Tht random value
yes, but why you answered that when I told you a possible solutionm for your problem?
Charly
declare it inside the view
Abhie
Abhie
Maxim
Abhie
Abhie
But it is giving the same code for all registering user
Maxim
Abhie
Sry but while i was using sqlite3 it gave different code for different user
Nasib
Hello everyone, I need help on my project, I have two models Product and Order, I sent relationship with foreignkey from Product model to Order model, so from Product model one column is connected to Order model. I want it so that when I delete something from Product model , in Order model if its active status about there is same that column with Product model , this should not be delete from the Product model. anyone can help me about codes in views in delete function, thanks.
IZUKU
Nasib
Brand is column in Product model and also in Order model with foreignkey
order=order.objects.all()
For x in order:
If x.Product_id.Brand==0:
Product=Product.objects.get(id=id)
Product.delete ()
Else:
Messages.warning(request, 'You can't delete Brand Because its active status '
Nasib
Nasib
It is working about active status I see that message when I want to delete active status But if I have different brands in Product that's not in order and active status I cannot delete that brands also so that's not correct codes
axi
Hi! Need help, please
When I use filter in django admin it select not all objects, it select just first page
How can I select all objects?
Thanx
axi
Hope you could help)
Shabeeh
Is there a way for switching languages in a django application or is it more tilted towards the frontend
IZUKU
Nasib
Indents are all good? I mean in ur codes cuz its wrong here
Everything is working, and when I'm deleting any brand in Product model if it is same exist brand in order its not deleting and return that warning messages its working but if I want to delete any brand which isn't exist I didn't add in order that not deleted also (
~:$
Mahmood
Hi..
Do anyone know a Django package for admin tabs
axi
Hi! Need help, please
When I use filter in django admin it select not all objects, it select just first page
How can I select all objects?
Thanx
axi
axi
No
Functional is stable and noneditable in most cases
axi
Mahmood
what goals do you have?
I want to organize the fields in nice way
I'm using django-admin-nested to do nested inlines
But there alot of fields and models in the page
I'm trying to organize them to be more understandable
Mahmood
I'm using django-admin-interface and i like it
So just wanted a way to add tabs
Y
yes. I passed the django tutorial
Doragonsureiyā
Then how to use orm of django with mongodb
Do you want to use Django with MongoDB? Then you shouldn't
Please read this article:
https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Anonymous
Just asking which database is more secured and perfect for production ready website?
SQLite or PostgreeSQL?
Xoxooxo
Hi
Can anyone help me with
Custom user model,
Authentication backend
Ali
Yulian
I need to make a websocket endpoint, when connected to which every couple of seconds the user will send his geo-coordinates from the front, can someone tell me how best to implement the backend in terms of django-channels, maybe someone knows a tutorial or an article on this topic. The point is that this is not a chat, but a channel with only one user
Doragonsureiyā
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Xoxooxo
Xoxooxo
https://stackoverflow.com/questions/74193685/custom-user-model-custom-authentication-not-working
Samrah
How can i send a post request in django with the authorization header where I have to put the api key
Samrah
Like in axios, I can use the authorisation header
Samrah
I have to put my API key in there
Samrah
Request headers have a authorization property right
Samrah
Is there a way to set it?
~:$
you can set the header by yourself..... the pattern is "bearer token" something like that
axios.get(YOUR_URL, { headers: { Authorization: `Bearer ${data.token}` } });
Samrah
Is there a way to do this in django? I'm trying to make a request to an api like that
Gud
Hello
Can i use Django in an Android app for backend purposes? Like storing and reading data, authentication etc.
~:$
Samrah
~:$
~:$
Samrah
Gud
Anonymous
I have django project, project connect vue3 but django not found js? How can i solved?
Samrah
Ali
khajan
User
Hello everyone!
I want to make my internal web-site completely"offline"
But one of my CSS files has this @import
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400&family=Poppins:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
It loads several "fonts" from fonts.googleap.....
I'm working on something like a CRM project for the company and sometimes we have troubles with the internet connection
The browser freezes if there is no internet so I want to make it more stable
I tried to run "manage.py collectstatic", but failed
What can I do in such a situation?
User
Hello everyone!
I want to make my internal web-site completely"offline"
But one of my CSS files has this @import
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400&family=Poppins:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
It loads several "fonts" from fonts.googleap.....
I'm working on something like a CRM project for the company and sometimes we have troubles with the internet connection
The browser freezes if there is no internet so I want to make it more stable
I tried to run "manage.py collectstatic", but failed
What can I do in such a situation?
In short, I want to download all the fonts))
Sunil
Hello everyone!
I want to make my internal web-site completely"offline"
But one of my CSS files has this @import
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400&family=Poppins:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
It loads several "fonts" from fonts.googleap.....
I'm working on something like a CRM project for the company and sometimes we have troubles with the internet connection
The browser freezes if there is no internet so I want to make it more stable
I tried to run "manage.py collectstatic", but failed
What can I do in such a situation?
Download this font then manually in the css file
Mahkam
Sunil
User
Fredrick
Hello guys I need help on how to automatically generate user id and password on a Django app without the need of the user doing so himself, the generated passwords and user id should appear in the database. I've tried different ways but I haven't succeeded yet.
Kamlesh
Kamlesh
Go through this url it will help full for you
axi
Hi guys
Have a problem
When I try to select all items in django admin in only selects just one page
PLEASE HELP)