I have a project with several app and it is giving me "ProgrammingError: relation" auth_user "does not exist»

1

I have a project with several app and you are giving me this error

  

django.db.utils.ProgrammingError: relation "auth_user" does not exist

I've already tried putting

  

python manage.py migrate

     

python manage.py makemigrate

It tells me that there are no changes and, in the end, I still get the same error even tried migrating app by app for example

  

python manage.py migrate user

and, nothing, the same error follows me ... I followed everything they have put and nothing solves the problem

    
asked by ann 24.05.2016 в 19:27
source

2 answers

1

It would be good to specify which version of django you are always using, since database manager you are connecting, if you are in a test environment and you can afford to delete the database, I recommend deleting the database and re-generate it with python manage migrate If still error then it is some configuration could be the order of your installed apps if any of your models in any of your apps is related to the User model then 'django.contrib. admin 'must be before those apps.

Another option testing migrations by app is to run first:

python manage.py migrate auth

and then:

python manage.py migrate
    
answered by 08.06.2016 в 07:55
0

Normally, that error is given by not including the application 'django.contrib.auth' in your file settings.py

INSTALLED_APPS = (
    ...
    'django.contrib.auth'
    ...
)
    
answered by 09.07.2016 в 21:54