Browse Source

Changed Model import in Misago settings to lazy one.

Rafał Pitoń 11 years ago
parent
commit
a1e7bc02b9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      misago/conf.py

+ 1 - 1
misago/conf.py

@@ -1,6 +1,5 @@
 from django.conf import settings as dj_settings
 from django.conf import settings as dj_settings
 from django.core.cache import cache
 from django.core.cache import cache
-from misago.models import Setting
 from misago.thread import local
 from misago.thread import local
 
 
 _thread_local = local()
 _thread_local = local()
@@ -8,6 +7,7 @@ _thread_local = local()
 def load_settings():
 def load_settings():
     settings = cache.get('settings', {})
     settings = cache.get('settings', {})
     if not settings:
     if not settings:
+        from misago.models import Setting
         for i in Setting.objects.all():
         for i in Setting.objects.all():
             settings[i.pk] = i.value
             settings[i.pk] = i.value
         cache.set('settings', settings)
         cache.set('settings', settings)