Commits

Andrew Godwin  committed e9f8527

Fix #457

  • Participants
  • Parent commits b5945de

Comments (0)

Files changed (1)

File south/introspection_plugins/django_tagging.py

 from south.modelsinspector import add_introspection_rules
+from django.conf import settings
 
-try:
-    from tagging.fields import TagField
-except ImportError:
-    pass
-else:
-    rules = [
-        (
-            (TagField, ),
-            [],
-            {
-                "blank": ["blank", {"default": True}],
-                "max_length": ["max_length", {"default": 255}],
-            },
-        ),
-    ]
-
-    add_introspection_rules(rules, ["^tagging\.fields",])
+if "tagging" in settings.INSTALLED_APPS:
+    try:
+        from tagging.fields import TagField
+    except ImportError:
+        pass
+    else:
+        rules = [
+            (
+                (TagField, ),
+                [],
+                {
+                    "blank": ["blank", {"default": True}],
+                    "max_length": ["max_length", {"default": 255}],
+                },
+            ),
+        ]
+    
+        add_introspection_rules(rules, ["^tagging\.fields",])