You have 3 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth

20,533

So my problem was that I used wrong python version for migration.

python3.5 manage.py migrate

solves the problem.

Share:
20,533
Yevhen Kuzmovych
Author by

Yevhen Kuzmovych

Anyone can cook... but only the fearless can be great.

Updated on July 19, 2022

Comments

  • Yevhen Kuzmovych
    Yevhen Kuzmovych almost 2 years

    I've just created Django project and ran the server. It works fine but showed me warnings like

    You have 14 unapplied migration(s)...
    

    Then I ran

    python manage.py migrate
    

    in the terminal. It worked but showed me this

    ?: (1_7.W001) MIDDLEWARE_CLASSES is not set.
        HINT: Django 1.7 changed the global defaults for the MIDDLEWARE_CLASSES.
    django.contrib.sessions.middleware.SessionMiddleware, django.contrib.auth.middleware.AuthenticationMiddleware, and django.contrib.messages.middleware.MessageMiddleware were removed from the defaults. If your project needs these middleware then you should configure this setting.
    

    And now I have this warning after starting my server.

    You have 3 unapplied migration(s). 
    Your project may not work properly until you apply
    the migrations for app(s): admin, auth.
    

    So how do I migrate correctly to get rid of this warning?

    I am using PyCharm and tried to create the project via PyCharm and terminal and have the same issue.

    ~$ python3.5 --version
    Python 3.5.2
    
    >>> django.VERSION
    (1, 10, 1, 'final', 1)