Mikhail
I need someone to explain me User django model.
Mikhail
I mean I know the basic of that but when it comes to custom User model it's complicated
cj
I mean I know the basic of that but when it comes to custom User model it's complicated
read these... old but still gold - https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html - https://simpleisbetterthancomplex.com/article/2021/07/08/what-you-should-know-about-the-django-user-model.html
None
i want to add login with google in my djangorestapi project i dont use template any one can help me ?
Small
This is.not related to django at all
Its a django website. Maybe some minor configurations I missed?
Gaston
Its a django website. Maybe some minor configurations I missed?
Its a site with django as backend but the problem you described is related to some action you do and move static files from HTML bootstrap not a technical issue related to django itself so... is not a django problem
Georg
You should read documentation how to fetch data from admin through models
I mean I need to handle a data which a user sends to backend through admin's forms
cj
That was prime G thanks but for now everything is almost changed
maybe this one: https://dev.to/danielfeldroy/multiple-user-types-with-custom-data-fields-for-django-4iie he wrote Two Scoops of Django book, he has some interesting ways of doing things
Firdaus
https://docs.djangoproject.com/en/dev/howto/static-files/#top
Enlighting-man
Good day, I believe this is a recurring question, but could someone tell me the proper way to use 'static' and 'media' in S3 Buckets? I ran the 'collectstatic' command, and it sent the static files there, but when deploying the page, there are no styles visible.
IN
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 109: invalid continuation byte
Siddharth
Danish
Please don't paste incomplete questions
clouded
incorrect json format, maybe wrong brackets
That does not make sense to me.
IN
I can't use postgresql. I installed postgresql 16, pgadmin4, and when I want to migrate this is the error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 122: invalid continuation byte
IN
YES IT's django 5.
Mirco
YES IT's django 5.
So check in the documentation if PG16 is already supported And especially you need the latest psycopg 3
Mirco
Documentation will tell you everything But special mention to db generated field https://docs.djangoproject.com/en/5.0/releases/5.0/
IN
the PG16 support django 4th
Secret
the PG16 support django 4th
Please try to encode using latin1
Mirco
the PG16 support django 4th
Yup, it was my thought This means that something is not ok with your code If you share, we can help Otherwise we don't have magic ball
IN
in settings whene i delete the databses name that's what i have as result :python manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). December 14, 2023 - 11:04:38 Django version 4.0, using settings 'projet.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
IN
https://pastebin.com/LFdcn7kZ
IN
https://pastebin.com/eFuWy7Qd
Mirco
pages are expired
IN
DATABASES = {     'default': {         'ENGINE': 'django.db.backends.postgresql',         'NAME': 'INASDA',         'USER': 'postgres',         'PASSWORD': ' ',         'HOST': 'localhost',         'PORT': '5432',  # Port par défaut de PostgreSQL         'OPTIONS': {             'client_encoding': 'latin1',  # Spécifiez l'encodage approprié         },     } } that's my data base
IN
(myenv) PS C:\Users\Ines.NEDJAM\Desktop\projet> python manage.py makemigrations No changes detected (myenv) PS C:\Users\Ines.NEDJAM\Desktop\projet> python manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. December 14, 2023 - 11:45:25 Django version 4.0, using settings 'projet.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
IN
(myenv) PS C:\Users\Ines.NEDJAM\Desktop\projet> python manage.py makemigrations No changes detected
IN
(myenv) PS C:\Users\Ines.NEDJAM\Desktop\projet> python manage.py migrate Operations to perform: Apply all migrations: admin, auth, contenttypes, sessions Running migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0006_require_contenttypes_0002... OK Applying auth.0008_alter_user_username_max_length... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying sessions.0001_initial... OK (myenv) PS C:\Users\Ines.NEDJAM\Desktop\projet> python manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). December 14, 2023 - 11:51:05 Django version 4.0, using settings 'projet.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
P
I am integrating razorpay with django project. I am getting " payment failed the provided is does not exist" after filling upi I'd and hitting to pay. Help me to figure out this problem!
H🅴X🧶
hello guys . i’m getting this error and i don’t understand can anyone help. django.db.utils.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections?
H🅴X🧶
can you clarify on the installation.
Siddharth
That does not make sense to me.
Actually I faced this error while migrating my database and I fixed my json file then it worked that's why I suggested him
Ds
DATABASES = {     'default': {         'ENGINE': 'django.db.backends.postgresql',         'NAME': 'INASDA',         'USER': 'postgres',         'PASSWORD': ' ',         'HOST': 'localhost',         'PORT': '5432',  # Port par défaut de PostgreSQL         'OPTIONS': {             'client_encoding': 'latin1',  # Spécifiez l'encodage approprié         },     } } that's my data base
DATABASES = {     'default': {         'ENGINE': 'django.db.backends.postgresql',         'NAME': 'INASDA',         'USER': 'postgres',         'PASSWORD': ' ',         'HOST': 'localhost',         'PORT': '5432',  # Port par défaut de PostgreSQL         'OPTIONS': {             'client_encoding': 'latin1',  # Spécifiez l'encodage approprié         },     } } that's my data base
Mirco
can you clarify on the installation.
Just go to postrges website and install based on your OS
ROG 💻
This is my ajax code: https://pastebin.com/hDe2qPZ5
Ds
Are you using someone else's code?
IN
yes
Doragonsureiyā
yes
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://hastebin.com, https://nekobin.com, https://dpaste.org (or your favorite one)
Ds
yes
That project was created at that address
IN
so what will i do?
Ds
so what will i do?
Either place your project in that folder or create your own project from scratch
IN
I just copied the views, models...
Ds
I just copied the views, models...
https://realpython.com/get-started-with-django-1/
IN
i know all this steps
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://nekobin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Noname
Hello everybody! I hope, it would not be off top question, and hope for your help! I am trying to load docker container for production server (but now I do it on local machine). https://dpaste.org/cPHTd - This is my dockerfile, - docker-compose file, - dockerfile for nginx, - nginx config - and django settings about static. Main problem is that static files for admin panel do not responsed from server of nginx. I tryed fix this all day with different combinations. Please give me advice!
S.H.K
SELECT * FROM hr_employess INNER JOIN hr_employess ON hr_contact .ID = hr_employess .ID can help me how create i django ?
Muflone
What is this Cart? It's not a View nor a Model
Alireza
That in it there are add to cart,delete from cart,update customer cart that they are def in Cart Model
Muflone
A model is a class inheriting models.Model It doesn't seem a model
Alireza
Ok So how can i fix this error?
Vaibhav
Code?
Muflone
Ok So how can i fix this error?
If this Cart wants to be a view it should inherit from a View class. Made this way is entirely wrong
Shan
Shan: python - Not able insert into Django modeling - Stack Overflow https://stackoverflow.com/questions/77659279/not-able-insert-into-django-modeling I able insert into host table but not able insert hostparameter table. Not know why not able?
Md Abdur
can any one know how can i integrated Elasticsearch with django?
Doragonsureiyā
can any one know how can i integrated Elasticsearch with django?
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
.
Hello every one Please, I made a deployment for the django project on Render The links worked and were fine, but when I send anything from the links using resframework, it is not sent to Database, but if I send to the same link from Postman, it goes to regular Database (postgres) on Aiven.
Oviyan S
Can anyone help to solve error in my django project
Oviyan S
I am creating a project feedback system in that students can only give feedback how can I implement by using django
Oviyan S
I use abstract user model but it shows error
Oviyan S
I will share
Maxim
take a picture
don't give bad advice pictures are not allowed here