5
As the command line output says the problem is that you changed the models. The solution is to run python manage.py makemigrations
and then python manage.py migrate
.
2
The Best Thing You can do is, Delete the existing database.
In my case, I were using phpMyAdmin SQL database, so I manually delete the created database overthere.
Again run the following Commands:
python manage.py makemigrations
python manage.py migrate
python manage.py makemigrations <app_name>
python manage.py migrate
- [Django]-Unique email constraint for django.contrib.auth.user
- [Django]-Force re-collectstatic with django static?
- [Django]-Creating a User Registration Page using MongoEngine
2
IT COULD BE BECAUSE YOU HAVE NOT YET REGISTERED YOUR APP IN SETTINGS.PY inside this file install your app (put the name of your app in quotes) after you can make python3 manage.py makemigrations and then python3 manage.py migrate (it can be python3 or python without the 3 ):
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'new_app_name',
]
- [Django]-How to tell Django, that memcached running with item-size larger than default?
- [Django]-Docker error using python 3.7: Generator expression must be parenthesized
0
Hi my friend after all these steps if there was still this problem.
1- Clear all tables in the database.
2-Clear all history in the migrations folder of your project directory.
3-python manage.py makemigrations
4-python manage.py migrate
- [Django]-Django translation: msgfmt: command not found
- [Django]-Django-admin.py makemessages does not create .po files
- [Django]-403 error code when using axios.post to Django endpoint in React app
- [Django]-Django Rest Framework doesn't accept ArrayField POST