Home » Django model “doesn’t declare an explicit app_label”

Django model “doesn’t declare an explicit app_label”

To solve the Django model “doesn’t declare an explicit app_label”. It took me a long time to realise that I had an init.py in the same directory as the django manage.py.

Have you forgotten to include your application’s name in the settings file? The default class generated by the .manage.py createapp myAppName command at apps.py is myAppNameConfig. Where myAppName is your app’s name.

Make sure that you have added 'django.contrib.sites' to the installed apps and also refer the below solution.

In settings.py:




The settings file learns what you wish to call your programme this way. Later, in the apps.py file, you can change how it looks by adding the following code.


class myAppNameConfig(AppConfig):
    name = 'myAppName'
    verbose_name = 'A good Name'

Also find:

ImportError: No module named ‘exceptions’