Goglides Dev 🌱

Goglides Dev 🌱 is a community of amazing users

We are working on this space so that IT professionals can grow together.

Create account Log in

Discussion on: Dockerizing your Django- Application!

Collapse
bkpandey profile image
Balkrishna Pandey

Little bit confused on requirements.txt file. Are we supposed to create this file with following modules?

cat <<EOF > requirements.txt
django
djangorestframework
EOF
Enter fullscreen mode Exit fullscreen mode
Collapse
bkpandey profile image
Balkrishna Pandey

Finally figure it out,

so I have to create requirements.txt file using following content

django
djangorestframework
psycopg2
Enter fullscreen mode Exit fullscreen mode

But as soon as I login I am seeing following error message.

Image description

ProgrammingError at /api-auth/login/
relation "auth_user" does not exist
LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...
                                                             ^
Request Method: POST
Request URL:    http://localhost:8000/api-auth/login/
Django Version: 4.1.1
Exception Type: ProgrammingError
Exception Value:    
relation "auth_user" does not exist
LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...
                                                             ^
Exception Location: /usr/local/lib/python3.10/site-packages/django/db/backends/utils.py, line 89, in _execute
Raised during:  django.contrib.auth.views.LoginView
Python Executable:  /usr/local/bin/python
Python Version: 3.10.7
Python Path:    
['/code',
 '/usr/local/lib/python310.zip',
 '/usr/local/lib/python3.10',
 '/usr/local/lib/python3.10/lib-dynload',
 '/usr/local/lib/python3.10/site-packages']
Server time:    Fri, 30 Sep 2022 14:58:49 +0000
Enter fullscreen mode Exit fullscreen mode