To solve the Model class django.contrib.sites.models.Site doesn’t declare an explicit app_label and isn’t in an application in INSTALLED_APPS error, you can follow the below methods.
django.contrib.sites to the installed apps. And also set the
SITE_ID to 1 in your settings. Look at the below sample.
INSTALLED_APPS = [ ... 'django.contrib.sites', ... ] #setting SITE_ID TO 1 SITE_ID = 1
The Sites Framework is a contributed module included with Django’s core library. Which allows you to use a single Django application/codebase for several sites. The SITE ID parameter “is required so that application data may hook into specific sites and a single database can manage content for several sites,” according to the documentation.
Django model “doesn’t declare an explicit app_label”