Ha 💙
have you installed apps in settings.py
The installed_apps contains my app ('blog') and also contains 'django.contrib.postgres' and the problem is still the same
Ha 💙
Could the problem be with UTF8 encoding??
WALKERVPN
How to customize the form used to create registration in django? because mine always looks weird
Alex
Could the problem be with UTF8 encoding??
that's highly unlikely
Alex
can you share your codebase
Ha 💙
can you share your codebase
Send media is not allowed in this group
Ha 💙
modesl.py??
Ha 💙
do you mean models.py file?
Maxim
do you mean models.py file?
i don't know what you're talking about what i'm saying is that you don't need to be able to send pictures in order to share the code
Ha 💙
can you share your codebase
I solved the problem, I have to put the name of the app after the dumpdata command
Ha 💙
Thank you bro
.
hello everyone. im begginer, can anyone help I can't figure out if the MEDIA_ROOT and MEDIA_URL variables are reserved variables in python or can we give them any value? to just pull them out of the settings file later. then why do I have a duplicate media/media route
Jarvis
Hello guy, How can I use the Django predefined user model but add more fields?
Mamad
Hello guy, How can I use the Django predefined user model but add more fields?
you can create a custom user model and inherit from django.contrib.auth.models import AbstractUser
Mamad
just make sure to also add that class to your settings AUTH_USER_MODEL = "yourapp.CustomUser"
Mamad
you also need to implement it in your admin.py as well if you intend to use that too
Poojitha
Hello guys, I was created security middleware and some configurations, and the thing is when I'm trying to hit a request to my endpoints I'm unable to get the page and the issue is : "You're accessing the development server over HTTPS, but it only supports HTTP", to avoid this issue I was tried to set SECURE_SSL_REDIRECT = False, and hit a request with 'http', I commented related code and configs, even though I'm unable to get the endpoints in browser, I was unable to findout the issue? can anyone please help me out this?
Dark
hello i am a beginner and i am facing problem with my localhost as it is not updating , whenever i am refreshing it only shows page saying The install worked successfully! Congratulations! View release notes for Django 5.1 You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs. Django please help me
Kasem
If I want to build map and view shortest path in Django how should I think? Thanks 🙏
Mirco
If I want to build map and view shortest path in Django how should I think? Thanks 🙏
https://www.paulox.net/2020/12/08/maps-with-django-part-1-geodjango-spatialite-and-leaflet/ https://www.paulox.net/2021/07/19/maps-with-django-part-2-geodjango-postgis-and-leaflet/
Yathish
can anyone aware of middleware in Django?
just search the middlewear django youll get the documentation
Manish
While running command: python manage.py runserver 0.0.0.0:8000 It shows This site can't be reached error
Rishav
Just do python manage.py runserver
themann
How do you set session timeout value for when user leaves the page. And what's the typical timeout value?
مريم خالد
Hi everyone, I have django project which use ai model to generate some result the ai model run in multiple times what are the best approach for making api to handle generating the result and return it also should I use async to handle many users requests or that can be done by the cloud , and if I should use async with my apies what should library should I use ? Thanks in advance
Bola
Good afternoon guys, I am trying to implement a DRF on a project then I later added uuid after testing API on postman but I noticed error immediately I include uuid to my model. This is the error I have when I run python manage.py makemigrations "psycopg2.errors.CannotCoerce: cannot cast type bigint to uuid LINE 1: ...E "job_app_job" ALTER COLUMN "id" TYPE uuid USING "id"::uuid"
Kartik
I want to convet php code to python
Kartik
Can anyone help me out
Kartik
Maxim
I want to convet php code to python
impossible you have to write new code that do the same as that php code
Kartik
Can you help me with that
Doragonsureiyā
Can you help me with that
No one can help you until you explain your difficulties.
Kartik
I can send the files in dm if u like ?
Doragonsureiyā
Please don't send useless messages (rule #3).
️امیر
Good afternoon guys, I am trying to implement a DRF on a project then I later added uuid after testing API on postman but I noticed error immediately I include uuid to my model. This is the error I have when I run python manage.py makemigrations "psycopg2.errors.CannotCoerce: cannot cast type bigint to uuid LINE 1: ...E "job_app_job" ALTER COLUMN "id" TYPE uuid USING "id"::uuid"
The id field of your model was IntegerField (it's the default), but now you are trying to change it to uuid. The error indicates that you can not convert integer to uuid If you have data and you want to keep it, my solution is to use dumpdata and then write a script to replace the ids with a uuid But if you don't have sensitive data, you can simply delete the database and create a new one
Abhinand
Hii i got a job offer from a mumbai based compony. They are offering 3.6lpa is it bad or good
Rajesh
Guys I have developed an website using Django in mac and added some testing data in my mac book mysql database. Now I need all the data along with my code on windows. Does it possible to export the data from my mac sql db to windows sql db .if yes how to do this
Mohammad Hossein
Guys I have developed an website using Django in mac and added some testing data in my mac book mysql database. Now I need all the data along with my code on windows. Does it possible to export the data from my mac sql db to windows sql db .if yes how to do this
I don't remember how exactly, but there are some ways to backup and export the database I think there is a mysql tool that makes a sql code which creates the backed up database with all its data Search the google about it
Rajesh
Any way is possible to do right??
Rajesh
Thank you 😊
Mohammad Hossein
Thank you 😊
Yw, sorry I would tell you the exact name of the tool if I remembered it 🤕
Nima
Hi guys What is this error? TypeError at /cart/ Field 'id' expected a number but got <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x000001A83B841310>>. Is it because the user is unauthenticated right?what should i change with this error?the project is simple e-commerce and i want the unauthenticated user adds product to cart and for checkout got redirect to a signup page;you can find the code details here in below: https://privatebin.net/?95acb4f7ac6da03e#563fJSuJ6z8Q1pC1W8CmthvmMHYXDDAyWG1jaEJHVeLz
Bhushan
Guys I have developed an website using Django in mac and added some testing data in my mac book mysql database. Now I need all the data along with my code on windows. Does it possible to export the data from my mac sql db to windows sql db .if yes how to do this
python manage.py dumpdata > data.json Store data in. Data.json file Then Execute python manage.py loaddata > Data.json other project where you want to store data
cj
you are using str in the id field make it int
wrong, read the error message again he's not using str, it's a SimpleLazyObject ... far away from being a str
Amirhossein
Hi. Has anyone ever changed Django's default registration form error messages? I get a popup in the fields required when I press the tab button, and it tells me please fill out this field. I should like to change this text to something else. Has anyone done this?
麦当劳
You can change this in your modelForm
Shohruh
Hello I'm having trouble with CustomSearch that is, there is a post model, its fields such as color, region, district should be retrieved from the database according to the value, and then the rest of the fields, such as model, brand, trim, price, year, are searched directly from the database. is working i mean black chevrolet captiva should only bring black chevrolet captiva but i have both black and chevrolet captiva bring posts matching fields
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Yahya
how to create login and register user with abstractuser
Mirco
how to create login and register user with abstractuser
Google it or ask some AI Internet is really full of articles and tutorials about it If Django doc is not enough for you
Amirhossein
You can change this in your modelForm
Actually I did that, I used error_messages dict in form fields, but it didn't help
Amirhossein
I checked Django form source code, still didn't find anything for this case
Amirhossein
Btw, I'm not talking about error messages, they're handled easily, I'm concerned about browser errors that pops up at each input in the user's browser
Apple🍎
I'm trying to deploy my website on my local machine using nginx and gunicorn. Both services are up and running but when I go to my ip address on my local machine it shows the default nginx page. And the ip address is not accessible from other devices
Apple🍎
I was following digitalocean's guide for this This one: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu
Apple🍎
Please guide me on how do I approach this
Binance
Please guide me on how do I approach this
If you are getting the default ngunx page, it means that nginx is running correctly but is not mapping the requests internally. Check gunicorn with """sudo systemctl status gunicorn"""
Binance
If you are getting the default ngunx page, it means that nginx is running correctly but is not mapping the requests internally. Check gunicorn with """sudo systemctl status gunicorn"""
If running check on what local Ip probably 127.0.0.1:8000 If it is ok, check the nginx service file and ensure that the proxy are mapping to that IP
clouded
Please guide me on how do I approach this
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu#nginx-is-showing-the-default-page-instead-of-the-django-application
Apple🍎
It's working now on my local machine but on my mobile device I'm getting this 'this site can't be reached'
Jack
Hello everyone I installed django-unfold but its styling isnt being shown on my app. Its still plain as the django admin. Any guidance
Kannan
Hello Everyone Currently, I am learning Django. To gain a better understanding of the framework, I would like to work on projects. I would like to work on a different project than the regular one like ecommerce., Could you please assist me with this?