Commits

Ollie Rutherfurd committed a542390

implemented south_field_triple()

  • Participants
  • Parent commits f2f4d58

Comments (0)

Files changed (2)

easymarkdown/fields.py

         defaults.update(kw)
         return super(MarkdownField, self).formfield(**defaults)
 
+    def south_field_triple(self):
+        "Returns a suitable description of this field for South."
+        try:
+            from south.modelsinspector import introspector
+        except ImportError:
+            introspector = lambda self: [], {}
+        args, kwargs = introspector(self)
+        return ('easymarkdown.MarkdownField', args, kwargs)
+
+
 # use custom widget by default in the admin
 from django.contrib.admin.options import FORMFIELD_FOR_DBFIELD_DEFAULTS
 FORMFIELD_FOR_DBFIELD_DEFAULTS[MarkdownField] = {'widget': widgets.AdminMarkdownTextareaWidget}
     # replace sourcecode blocks with literal blocks
     return re.sub(r'\.\. sourcecode:: \w+', '::', s.strip())
 
-VERSION='0.1'
+VERSION='0.2'
 
 setup(
     name='django-easymarkdown',