Gregory Petukhov  committed b784ea9

Improve system.setup_django (logging issue)

  • Participants
  • Parent commits 7f57f88
  • Branches default

Comments (0)

Files changed (2)

File common/

+Use this function at very start of your script
+which needs to work with django stuff.
+Use it as first as possible to correctly initialize logging settings
+(if you use django.settings.LOGGING feature)
 import os
 import sys
     os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
+    from django.conf import settings
+    # Force django.conf.settings calculation
+    # This is required to initialize logging with settings
+    # from django.conf.settings.LOGGING
+    hasattr(settings, 'foo')
 from setuptools import setup
 PACKAGE = 'common'
-VERSION = '0.1.40'
+VERSION = '0.1.41'
 if __name__ == '__main__':
     # Compile the list of packages available, because distutils doesn't have