1. Simon Meers
  2. django-markitup

Commits

Carl Meyer  committed 0561e2f

add South support for MarkupField

  • Participants
  • Parent commits b2ce1b6
  • Branches default

Comments (0)

Files changed (1)

File markitup/fields.py

View file
 # register MarkupField to use the custom widget in the Admin
 from django.contrib.admin.options import FORMFIELD_FOR_DBFIELD_DEFAULTS
 FORMFIELD_FOR_DBFIELD_DEFAULTS[MarkupField] = {'widget': widgets.AdminMarkItUpWidget}
+
+# allow South to handle MarkupField smoothly
+try:
+    from south.modelsinspector import add_introspection_rules
+    add_introspection_rules(patterns=['markitup\.fields\.'])
+except ImportError:
+    pass
+