Permalink
Browse files

Added support for South

  • Loading branch information...
1 parent 933d78c commit 5bf648ff4d788917dd5314f78b8e609428609bac @dcramer dcramer committed Sep 2, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 uuidfield/fields.py
View
@@ -50,4 +50,11 @@ def pre_save(self, model_instance, add):
# Assign a new value for this attribute if required.
value = self._create_uuid().hex
setattr(model_instance, self.attname, value)
- return value
+ return value
+
+ def south_field_triple(self):
+ "Returns a suitable description of this field for South."
+ from south.modelsinspector import introspector
+ field_class = "uuidfield.UUIDField"
+ args, kwargs = introspector(self)
+ return (field_class, args, kwargs)

0 comments on commit 5bf648f

Please sign in to comment.