Anonymous
Hello everyone
I tried to use postgresql instead of sqlite in my project.
But when i ran python manage.py migrate, i got this error
.....
return executor(sql, params, many, context)
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(11)
what should i do?
Maxim
Hello everyone
I tried to use postgresql instead of sqlite in my project.
But when i ran python manage.py migrate, i got this error
.....
return executor(sql, params, many, context)
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(11)
what should i do?
read last line
Dd
Whenever i am changing script in html files in django have to restart the servers in django is there any way to avoid it .
Maxim
Alex
Hello everyone
I tried to use postgresql instead of sqlite in my project.
But when i ran python manage.py migrate, i got this error
.....
return executor(sql, params, many, context)
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Hamid\Desktop\khademin\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(11)
what should i do?
https://stackoverflow.com/questions/13485030/strange-postgresql-value-too-long-for-type-character-varying500
You probably have a models.CharField which is actually stored as Text type in sqlite. But postgres restricts size of this field.
Alex
So in short - you messed up your data.
.
Is anyone here experience working with postgresql need help with configuring with db,as I can't send pictures of db here so I needed to dm you.Please help!
.
Doragonsureiyā
Doragonsureiyā
How I can send pictures of the confirguration here?
5️⃣ If you want to share code use a sharing service like del.dog, dpaste.org, hastebin.com, linkode.org, no walls of text. Use markdown if sharing around 5 lines of code. Don't post any kind of photography/video of your screen.
Alex
.
https://pastebin.com/i46003t8
.
The user and password will be the superuser username and password while configuring database for postgresql?
James
Hi friends.
How should i change language on the entire using button in django?
Pulkit
Hii,
I have used cache in Django and when i was running the same url in different devices then it was showing the cached data which was cached from another device.
In my pc when I hit the url it cached a view. and when i hit the same url in my android device then also it was showing me the cached data which was cached in my pc
Is it happen for every website or it was just happening because i was using the same development server on different machines?
Alireza
I want can search in select' options
How??
Optimus
Nivatharan
Guys I after long while I published my webapp on pythonanywere panel. But I got some issues, it's mean I can't load the CSS file on it
Link: http://nivan.pythonanywhere.com/
What's wrong here and what I wanna to do?? Give me Ur suggestions
Anonymous
Is there anything i can do to speed up the translation of a Django project so that i don't have to write every single message myself. Thanks in advance.
Charly
AceT0ne
I am able to save image using admin but when i use form it is not getting saved
AceT0ne
Views.py
Photo=requests.POST.get('photo')
AceT0ne
Models.py
photo= models.Imagefield(upload_to='pics')
Anonymous
AceT0ne
AceT0ne
Enigma
hey
anyone used django filters before?
i want to use attributes in them... how should i do that?
Manish
Hey
I have a multilevel nested model.
now i want to make model where nested model comes random number of time. I'm totally confuse.
Azizbek Xushnazarov
Manish
Enigma
Manish
Hey
I have a multilevel nested model.
now i want to make model where nested model comes random number of time. I'm totally confuse.and I'm using dynamodb as db
Manish
class SchoolRouteStop(models.Model):
school_id = models.CharField(max_length=100)
school_route_number = models.IntegerField()
route_type = models.CharField(max_length=2)
route_graph = None # the route_stop is model than discribes number of bus stops and other details
Manish
can someone pls help
Maxim
Manish
None for temp till i do research
Maxim
Maxim
it is impossible to copy and paste text from pictures
typing text that I could copy and paste, I'm not going to
for the same reason, I did not even think to read it
have a nice day!
Maxim
route_stop_id is relation to the same route_stop model?
is this a multilevel?
why not ForeignKey?
Manish
1. yes (route_stop_id is been used for track stops)
2. yes ( I'm new to django i may be wrong)
3. route_stop is for individual stop
In route_graph there can be 10-20( random) number of object of route_stop
Pulkit
Charly
Pulkit
I want to use cache for a large file which should be stored in the clients side so that it do not loads every time. Then how can I do that?
Because if caches work on server side then it will load the same file from the server again not from the client's local cached data.
Athar
Hello guys in drf how to create multi role authentication
kuzmich
Athar
I am creating a news api. There will be three types of user reader, repoter and admin with different data table and sets of fields
kuzmich
игорь/igor
https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#extending-the-existing-user-model
And also refer to this article with highly detailed instructions:
https://testdriven.io/blog/django-custom-user-model
Athar
Ok
Nikita
Hey, I need help. I use DRF and try POST request to view. But I get "CSRF Failed: CSRF cookie not set.". Although I set DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
k1k0
Maan
how can i develop image cropper in django
Maxim
Maxim
Maxim
Dev
When I upload an image to Heroku's django project, it automatically gets deleted after a few minutes.
игорь/igor
Anonymous
i am unable to use the internet on win 7
Your connection is not private
Your connection is not private
i am getting these errors can anybody help me
and time is correct of my pc
kuzmich
Anonymous
bro i am getting this error on many site even on vs code offical site
Anonymous
is there any solution i start happening when i shifted from win 10 to 7
Doragonsureiyā
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Сергей
Hello, is there way to pass formset to form as field?
Optimus
игорь/igor