True
When I'm trying to use trigramworddistance I get this error:
operator does not exist: text <-> unknown
I googled but couldn't find a solution
Charles
Hello anyone on how I can implement login apiviews
Doragonsureiyā
Paŭlo
Hi, I want to cache the result of a Django Rest Framework endpoint. If I use the decorator cache_page, it tells the browser to cache the result. I don't want to do that because I want to invalidate the cache.
How can I use only server side caching?
Mirco
Paŭlo
I did it, but it sets the max-age in the response headers
Mirco
Mirco
from django.core.cache import cache
this cache
https://docs.djangoproject.com/en/4.1/topics/cache/#the-low-level-cache-api
Hemant
is there anyone who ever overridden the admin template of change_form before?
Mirco
Hemant
I am trying to do that but form is not loading, only the submit button shows up
Whereas same template works fine if I load it as a normal view
šяıяαм〘CID〙
binascii.Error: Incorrect padding
bro how can i solve this error
True
How do we search a blog content in Django,
I'm using trigramworddistance but it's not providing acceptable result when I search a keyword in whole blog content Text
Tatiana
Hi All! Needed help
I'm i the middle of the project and have some data in db aslo I have a lot of migrations.
But,now I need to rewrite user to customuser that below a lot of changes like in setting.py registration,view changes,form changes - apllyed .
But
When I try to detele migrations via migrations <app_name> zero I have a ValueError that customuser model is not found
Okey,it is real in app with user authentication and it is imported to all needed files such as mainapp/settings.py ,views
Rewrited form form customer create etc
My question
Why I can't delete migrations via app zero?
Is it good way to remove it not via cmd ,just button delete all ?
Please ,if you know anything about this problem or have some link to good tutorial, official documentation ,example of same project - share it 🙏🙏🙏
Mahmood
Mahmood
The Inspired
Hi All! Needed help
I'm i the middle of the project and have some data in db aslo I have a lot of migrations.
But,now I need to rewrite user to customuser that below a lot of changes like in setting.py registration,view changes,form changes - apllyed .
But
When I try to detele migrations via migrations <app_name> zero I have a ValueError that customuser model is not found
Okey,it is real in app with user authentication and it is imported to all needed files such as mainapp/settings.py ,views
Rewrited form form customer create etc
My question
Why I can't delete migrations via app zero?
Is it good way to remove it not via cmd ,just button delete all ?
Please ,if you know anything about this problem or have some link to good tutorial, official documentation ,example of same project - share it 🙏🙏🙏
Never ever delete migrations!
Also, the official Django docs do not recommend switching user model midway through the project
Tatiana
The Inspired
That is why they explicitly mention in the docs that even if you do not have any need of it, always override the default user model in commercial apps
The Inspired
but now what's done is done...
The only way is to delete all your migrations, and delete the 'django_migrations' table from your database and rerun migrations and migrate
Mahmood
Tatiana
You're right
I know it and also can understand why it is not recommended
But its my study proj proj and I have not time to recreate
It is not for production usage, thanks
Alex
Tatiana
Mahmood
Tatiana
_init._ file don't touch ,yes ? (In migrations folders in all apps where I have any migrations files)?
Alex
Tatiana
Mahmood
True
what is the best practice to add tags into a blog item?
True
in models
Abhishek
hi, i need help for this
Im trying to upload multiple images by passing below list of dict to django
['[{"uri":"file:///data/user/0/host.exp.exponent/cache/ImagePicker/447d9e23-0cef-4694-bb28-0c0002eb2a31.jpeg","type":"image/jpeg","name":"447d9e23-0cef-4694-bb28-0c0002eb2a31.jpeg"}]']
but the problem is, it is entry is getting created in db but file is not upload in folder. please help
Alex
Abhie
How to establish one-to-one relationship between two user model of 2 diff apps in same django project?
Alex
Abhishek
does your form have enctype
using react native image picker and formating data we get from picker in {uri:'', type:'', name:'' } and in django creating add_image method in models file to store the image
Abhishek
image = Image.objects.create(file=file)
self.images.add(image)
here images is extended field from Image table having ManytoMany relationship
Tiger
Hello everyone. How would you deploy a django project on PC? Lets say project was developed for particluar single client, so no need to deploy it on remote machine.
cj
(BEMØ
I had a big problem with django
(BEMØ
Ok
(BEMØ
alright then my problem is i installed django already
(BEMØ
and my visual dosen,t recognizied abot django
(BEMØ
then it,s get me message missing module source
(BEMØ
and i can,t find any solve to my problem not only django it,s do it to any module i installed like termcolor and pyfiglet
Stanislav
What you the first Django Project?
Doragonsureiyā
What you the first Django Project?
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so move to @PythonOfftopic group and ask there.
Abhie
Alex
Alex
also, sharing codebase will be helpful
Vasilii
i have a user table in banking schema and app is planned to be on golang, now i want use django as authorization and authentication server, how to properly migrate it. When i do migrate it, django creates table in public schema
True
Despite my googling couldn't find way to pass a queryset to a model serializer class, anyone can help please
Aslan
Hello, what's the best way to export filtered models data to excel?
Jerome
cj
Mohammad
Hi guys i need an api to take country or city name and give me the date and the time in there.
Neo
Marc
Mohammad
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
Hey guys! How to get variable declared in template e.g. {% with name='Hello' %} to view?
Marc
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
i need to make a loop which depends on its parent loop, that's why im askin
Marc
do it the other way round, declare in view and the use in template
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
{% for k in i.inners.all %}
<li><a href="">{{k.name}}</a></li> {% endfor %}
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
Pavel
when I try to raise a project in docker, I get this error, what does it mean?
Do you need a non-empty base to run?
Operations to perform:
Apply all migrations: account, admin, amenities, auth, chat, contenttypes, core, forum, mailer, news, notifications, sessions, sites, sms, social_django, ticket, zicoin
Running migrations:
Traceback (most recent call last):
File "/usr/src/dom/manage.py", line 22, in <module>
main()
File "/usr/src/dom/manage.py", line 18, in main
execute_from_command_line(sys.argv)
—-//———
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 429, in get
raise self.model.DoesNotExist(
account.models.DoesNotExist: User matching query does not exist.
Abhie
Hi, can I add face recognition model in my django project ? If yes then can somebody suggest me some face recognition model pls 🙏🙏
Thnks....!!
zak00999
Alex
when I try to raise a project in docker, I get this error, what does it mean?
Do you need a non-empty base to run?
Operations to perform:
Apply all migrations: account, admin, amenities, auth, chat, contenttypes, core, forum, mailer, news, notifications, sessions, sites, sms, social_django, ticket, zicoin
Running migrations:
Traceback (most recent call last):
File "/usr/src/dom/manage.py", line 22, in <module>
main()
File "/usr/src/dom/manage.py", line 18, in main
execute_from_command_line(sys.argv)
—-//———
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 429, in get
raise self.model.DoesNotExist(
account.models.DoesNotExist: User matching query does not exist.
Nope, that simply means your database missing a entry which is required by some program