31
I noticed that only those apps that actually contain a migrations
folder that contain a file __init__.py
are recognized by migrations. IE having only models.py in your app is not enough.
16
If you have a single app, running migrate without specifying the app or migration may work.
If so, the first thing to check is that your app name matched that specified in your settings.py under INSTALLED_APPS.
As pointed out in the comments, app names can be in the form [parent_app].[app_name]. In this case, migrate needs [app_name] only.
- [Django]-How do you detect a new instance of the model in Django's model.save()
- [Django]-Django/DRF – 405 Method not allowed on DELETE operation
- [Django]-Django: For Loop to Iterate Form Fields
9
Your app must contain a models.py
file (even emtpy).
Source: https://groups.google.com/forum/#!msg/django-users/bsTZEmxgDJM/wH0p3xinBWIJ
- [Django]-Name '_' is not defined
- [Django]-Python 3 list(dictionary.keys()) raises error. What am I doing wrong?
- [Django]-How do I install psycopg2 for Python 3.x?
3
Just to mention another possible reason:
In my Django app i added the correct migrations and installed the app with pip and got the same error.
What i was missing is a correct MANIFEST.in file
Also the parameter include_package_data
in setup() from the setup.py file was not set to True
.
- [Django]-How to pass django rest framework response to html?
- [Django]-Name '_' is not defined
- [Django]-Rendering a value as text instead of field inside a Django Form
0
Please ensure the following:
- Confirm that ‘app_name.apps.AppNameConfig’ is added to the list of installed apps.
- Double-check the project’s database configuration in the
settings.py
file. - Make sure that each application includes a directory named
migrations
, and within that directory, there is a file named__init__.py
.
- [Django]-Python 3 list(dictionary.keys()) raises error. What am I doing wrong?
- [Django]-AccessDenied when calling the CreateMultipartUpload operation in Django using django-storages and boto3
- [Django]-Cannot access django app through ip address while accessing it through localhost