Author: leidel
Date: Wed Jan 21 02:16:56 2009
New Revision: 295

Modified:
    trunk/pages/models.py

Log:
Look in INSTALLED_APPS if django-tagging is installed to prevent probable  
circular import

Modified: trunk/pages/models.py
==============================================================================
--- trunk/pages/models.py       (original)
+++ trunk/pages/models.py       Wed Jan 21 02:16:56 2009
@@ -7,19 +7,13 @@
  from django.utils.safestring import mark_safe
  from django.core.cache import cache
  from django.core.urlresolvers import reverse
-from django.core.exceptions import ImproperlyConfigured
  from django.contrib.sites.models import Site

  import mptt
  from pages import settings
  from pages.managers import PageManager, ContentManager,  
PagePermissionManager

-try:
-    tagging = models.get_app('tagging')
-    from tagging.fields import TagField
-except ImproperlyConfigured:
-    tagging = False
-
+tagging = "tagging" in settings.INSTALLED_APPS
  if not settings.PAGE_TAGGING:
      tagging = False

@@ -51,6 +45,7 @@
      objects = PageManager()

      if tagging:
+        from tagging.fields import TagField
          tags = TagField()

      class Meta:

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to