'Python/Django project working correctly on a local host server but not working on a heroku server [duplicate]

I have created a web application where Sign Up and login was create using Django’s authentication system. Basically I used the code from this page: https://www.geeksforgeeks.org/django-sign-up-and-login-with-confirmation-email-python/

On my server the project is working perfectly, but when I did the hosting it is not possible to create users.

I have a suspicion that my problem is with the database because I am using the default django settings. This is the error I get when I try to create user on the hosted site:


 The above exception (relation "auth_user" does not exist LINE 1: SELECT (1) AS "a" FROM "auth_user" WHERE "auth_user"."userna... ^ ) was the direct cause of the following exception:
/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/exception.py, line 55, in inner

                    response = get_response(request)
Local vars
/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/base.py, line 197, in _get_response

                    response = wrapped_callback(request, *callback_args, **callback_kwargs)

Local vars
/app/user/views.py, line 32, in register

            if form.is_valid():

To Request information I got:

**Request information**

USER AnonymousUser

**GET** No GET data

**POST**

Variable    Value

username 'test01'

email '[email protected]'

password1 'mtHya2yaWRw2nxK'

password2 'mtHya2yaWRw2nxK'

As I said on the local host the site works very well. I would like to know how can I fix the error or how can I build a simple database just for user registration?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source