Commits

Anonymous committed 3eb6446

added south field hint to make migrations work.
(http://south.aeracode.org/wiki/DynamicFields)

  • Participants
  • Parent commits 678ab3e

Comments (0)

Files changed (1)

sorl/thumbnail/fields.py

             for extra, attrs in self.extra_thumbnails.items():
                 name = "%r of 'extra_thumbnails'"
                 _verify_thumbnail_attrs(attrs, name)
+    def south_field_triple(self):
+        "Returns a suitable description of this field for South."
+        # We'll just introspect ourselves, since we inherit.
+        from south.modelsinspector import introspector
+        field_class = "django.db.models.fields.files.ImageField"
+        args, kwargs = introspector(self)
+        # That's our definition!
+        return (field_class, args, kwargs)
 
 
 class ImageWithThumbnailsField(BaseThumbnailField):