Source

django-common / common / system.py

Diff from to

common/system.py

 import os
 import sys
 
-def setup_django(script_file, relpath=None):
+def setup_django(script_file, relpath=None, module='settings'):
     ROOT = os.path.dirname(os.path.realpath(script_file))
     if relpath:
         ROOT = os.path.join(ROOT, relpath)
     os.chdir(ROOT)
     sys.path.append(ROOT)
-    os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
+    os.environ['DJANGO_SETTINGS_MODULE'] = module
 
     from django.conf import settings