Tim Heap  committed 01b78b9 Merge

Merged in DXist/django-bleach (pull request #2)

Fixed issues with South

  • Participants
  • Parent commits b863698, c8d11c5

Comments (0)

Files changed (1)

File django_bleach/

 from django.db import models
 from django_bleach import forms
-from django_bleach.utils import get_bleach_default_options
 from django_bleach.forms import default_widget
+from django.conf import settings
 class BleachField(models.TextField):
         return super(BleachField, self).formfield(**options)
-    def south_field_triple(self):
-        return ('django_bleach.models.BleachField', [],
-            self.formfield_defaults)
+if 'south' in settings.INSTALLED_APPS:
+    from south.modelsinspector import add_introspection_rules
+    # Bleach attributes don't influence on data representation so we use
+    # default introspection rules of TextField
+    add_introspection_rules([], ['^django_bleach\.models\.BleachField'])