fix synnefo.settings circular import dependency
authorGeorgios D. Tsoukalas <gtsouk@grnet.gr>
Wed, 19 Jun 2013 14:29:10 +0000 (17:29 +0300)
committerGeorgios D. Tsoukalas <gtsouk@grnet.gr>
Wed, 19 Jun 2013 14:29:10 +0000 (17:29 +0300)
Break this import circle:

django.conf -> synnefo.settings (via DJANGO_SETTINGS_MODULE)
synnefo.settings -> pithos_webclient.synnefo_settings (via entry points)
pithos_webclient.synnefo_settings -> pithos_webclient.urls
pithos_webclient.urls -> pithos_webclient.settings
pithos_webclient.settings -> django.conf

which caused django.conf.settings to be initialized from
synnefo.settings before the latter was completely initialized.

snf-pithos-webclient/pithos_webclient/synnefo_settings.py
snf-pithos-webclient/setup.py

index 74e1d85..3a9df9d 100644 (file)
@@ -45,9 +45,3 @@ static_files = {'pithos_webclient': ''}
 context_processors = [
    'synnefo.lib.context_processors.cloudbar'
 ]
-
-# namespace
-from django.conf.urls.defaults import include, patterns
-urlpatterns = patterns('',
-    ('', include('pithos_webclient.urls')),
-)
index 1878c2b..9a00bf6 100644 (file)
@@ -288,7 +288,7 @@ setup(
     entry_points={
         'synnefo': [
             'web_apps = pithos_webclient.synnefo_settings:installed_apps',
-            'urls = pithos_webclient.synnefo_settings:urlpatterns',
+            'urls = pithos_webclient.urls:urlpatterns',
             'web_static = pithos_webclient.synnefo_settings:static_files',
             'web_context_processors = '
             'pithos_webclient.synnefo_settings:context_processors'