I have a typical Django web application. I want to create a separate project with its own virtualenv and use ORM to create new records in the database.
There are many resources on explaining how to do this, including this entry from the docs . Therefore, I wrote a script as follows:
import sys
sys.path.append("/path/to/django/project")
from django_proj import settings as django_settings
import django
from django.conf import settings
if not settings.configured:
settings.configure(django_settings)
django.setup()
When I try to run it this way, I get the following error:
AttributeError: 'module' object has no attribute 'LOGGING_CONFIG'
I believe that this is due to the fact that I do not LOGGING_CONFIGexplicitly specify in my settings. I rely on the default value.
My configuration works when I run it through python manage.py. What is the problem with this extra setting that causes the problems?
Thanks!