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?
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 .
Alex
So in short - you messed up your data.
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Hmmm, embed? In django?
Not in django In total, on my website
Alex
Not in django In total, on my website
Well, just install it with any regular way in your system.
.
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ā
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!
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Doragonsureiyā
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!
Can i send you a private message? No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
Doragonsureiyā
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!
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
Doragonsureiyā
How I can send pictures of the confirguration here?
Read the rules before any activity: @PythonRules
Alex
How I can send pictures of the confirguration here?
Do you configure your DB with pictures and photos? That's a stupit question. Just share your config.
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.
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Well, just install it with any regular way in your system.
I think you got me wrong I want to develop a website on which a Python Interpreter will be developed. Like this website which users practice https://www.w3schools.com/python/
.
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??
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.
Anonymous
Hire someone
thanks a lot 😹😹
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
Views.py Photo=requests.POST.get('photo')
requests.FILES.get("photo")
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
hey anyone used django filters before? i want to use attributes in them... how should i do that?
Please check out the official documentation about filters. There are good informations there
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.
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
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
Manish
None for temp till i do research
Maxim
None for temp till i do research
what about first question?
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
That's how caché works (on sever side)
So it means cache are stored on server side not on client's side. Right?
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.
Charly
So it means cache are stored on server side not on client's side. Right?
There are many cache locations, but Django cache as you implemented is stored in the server
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
игорь/igor
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
Subclass from AbstractUser and you ll be fine. This takes a little time though. Or as an alternative just extend the standard user model with 1-to-1 relationship models with different sets of fields.
игорь/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',
Maan
how can i develop image cropper in django
Nikita
this problem is well googled why didn't you do it?
Well, I did. But I spend ~6 hours trying to fix this. And currently not fixed
Nikita
Set a cookie on header, and try again. I think you can Get a cookie with postman when you login.
Firefox set cookie by default. I don't have authorisation. In the settings I specified AlloAny
Maxim
Well, I did. But I spend ~6 hours trying to fix this. And currently not fixed
what does rest_framework.permissions.AllowAny have to do with CSRF?
Maxim
Well, I did. But I spend ~6 hours trying to fix this. And currently not fixed
next opportunity is to read about CSRF and CSRF documentation in Django
Dev
When I upload an image to Heroku's django project, it automatically gets deleted after a few minutes.
игорь/igor
игорь/igor
Firefox set cookie by default. I don't have authorisation. In the settings I specified AlloAny
Find courses online, youtube or wherever you like. Try to follow them without skipping. This is a general advise. Start with super simple projects, don't do e-commerce or next Facebook. Most probably you gonna waste less time on solving errors this way.
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
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?
игорь/igor