pythondjango

Django: OperationalError at /admin/


So I ran my program based on from here and It worked without any error. I go to to /admin. I login. So far everything is good. Then when it loads I get this:

Error Code

I checked the traceback (which is really long) and none of includes my code. It doesn't tell me what part of the code this error is occurring in so I don't know how to approach this. Please explain what this is, why this is happening, and how I can fix it.

If you need any part of my code, just ask in comments because I don't know where this is happening.


Solution

  • You need to run migrate command in-order to force django to create auth tables.

    python manage.py migrate
    

    Then for any change you made on models, don't forget to run these two commands.

    python manage.py makemigrations
    python manage.py migrate