Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)
like image 410
Yevhen Kuzmovych Avatar asked Sep 13 '16 11:09

Yevhen Kuzmovych


1 Answers

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

python3.5 manage.py migrate

solves the problem.

like image 87
Yevhen Kuzmovych Avatar answered Sep 18 '22 02:09

Yevhen Kuzmovych