28👍
You may have deleted the migrations folder inside the app or __init__.py
inside the <app>/migrations/
folder, create a new one
myproject/
apps/
myapp/
migrations/
__init__.py
You can always do makemigrations seperately without doing the above step
python manage.py makemigrations myapp
7👍
try
INSTALLED_APPS = [
# ...
'myproject.apps.myapp',
]
and
python manage.py makemigrations myapp
- Creating Partial Indexes with Django 1.7
- Creating UTF-8 JsonResponse in Django
- How can I automatically let syncdb add a column (no full migration needed)
- Pycharm (Python IDE) doesn't auto complete Django modules
1👍
It’s works now. It didn’t work before because I didn’t make any changes to my model.
I’m new to django and was trying to execute the command from the videos I watched. Django documentation tells you that makemigrations create new migrations based on the changes you made to your model. So, I make changes in models.py and admin.py and it’s working now.
Source:stackexchange.com