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ā
Hello anyone on how I can implement login apiviews
Just read the documentation and do
Mihir
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
I think this is the distance operator which is not present in python, is that correct? An alternative to this is to use math.dist() function to calculate the distance.
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?
Paŭlo
I did it, but it sets the max-age in the response headers
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?
Doragonsureiyā
is there anyone who ever overridden the admin template of change_form before?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
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
Mirco
binascii.Error: Incorrect padding bro how can i solve this error
we don't have any magic balls, so share some code via pastebin.org or similar and you will get help
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 🙏🙏🙏
Tatiana
You have important database? Or it's ok for you if you delete it ?
It's ok to delete But a have a ValueError that customuser model not found when I'm trying to detele with //migrations zero
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
It's ok to delete But a have a ValueError that customuser model not found when I'm trying to detele with //migrations zero
If you don't care about the database You can delete the database and all the migrations files And remake theme
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
Tatiana
If you don't care about the database You can delete the database and all the migrations files And remake theme
Just handmade - button delete and re start as a regular new proj migrations migrate runserver ?
Tatiana
_init._ file don't touch ,yes ? (In migrations folders in all apps where I have any migrations files)?
Mahmood
Just handmade - button delete and re start as a regular new proj migrations migrate runserver ?
You Delete your database Delete all migrations from all the apps But don't delete init.py file for the migrations folder And then Do makemigrations....
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
Abhie
How to establish one-to-one relationship between two user model of 2 diff apps in same django project?
Alex
How to establish one-to-one relationship between two user model of 2 diff apps in same django project?
simple one to one should work or just connect them to third model just for relationship itself.
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.
(BEMØ
I had a big problem with django
Charly
I had a big problem with django
Well, if you want help then explain the issue
(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
simple one to one should work or just connect them to third model just for relationship itself.
I think theres an issue in views.py file, what should I store on one-to-one field colum , like i was trying to retrieve I'd of the prior model inorder to store however it doesn't retrieve I'd instead stores null
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
Despite my googling couldn't find way to pass a queryset to a model serializer class, anyone can help please
Use DRF https://www.django-rest-framework.org/tutorial/2-requests-and-responses/
Mohammad
Hi guys i need an api to take country or city name and give me the date and the time in there.
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
Hey guys! How to get variable declared in template e.g. {% with name='Hello' %} to view?
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
https://django.how/templates/declare-variables/
yes, but how to take this variable to view?
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
https://django.how/templates/declare-variables/
i need to access variable from template in views.py
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
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
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
do it the other way round, declare in view and the use in template
but child forloop depends on each iterable of parent forloop?
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
𝔐𝔞𝔯𝔰𝔥𝔞𝔩𝔩
{% 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....!!