Why Do I Get 'django Core Exceptions Improperlyconfigured...' When I Import From My Models?
I have had a look through answers regarding this error so my question is specifically why do I get this error when I include the following line?: from teams.models import clubs I
Solution 1:
If you are calling this script locally and not through the django server you need to import/configure the settings before you import e.g. your models:
from django.conf import settings
settings.configure(DEBUG=True, TEMPLATE_DEBUG=True,
TEMPLATE_DIRS=('/home/web-apps/myapp', '/home/web-apps/base'))
You can find more details here.
Post a Comment for "Why Do I Get 'django Core Exceptions Improperlyconfigured...' When I Import From My Models?"