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)
So my problem was that I used wrong python version for migration.
python3.5 manage.py migrate
solves the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With