I am following the answers on this question using django 1.10, how ever I'm getting following the error:
RuntimeError: Model class django.contrib.auth.models.Permission doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
I tried adding the app it complains about to INSTALLED_APPS but I still get an error. How can I get my example code below to work?
from django.conf import settings
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': '',
'NAME': 'mydb',
'PASSWORD': '',
'PORT': '',
'USER': ''}}
DATABASES['default']['ATOMIC_REQUESTS'] = True
settings.configure(
INSTALLED_APPS = ['django.contrib.contenttypes', 'ob_site.strats.apps.StratsConfig'],
DATABASES = DATABASES,
TIME_ZONE = 'UTC')
import django
django.setup() # error is thrown here