Commits

Andrew Godwin  committed 9e2c382 Merge

Branch merge

  • Participants
  • Parent commits ed97713, 8e81255

Comments (0)

Files changed (1)

File south/modelsinspector.py

         },
     ),
     (
+        (models.BooleanField, ),
+        [],
+        {
+            "default": ["default", {"default": NOT_PROVIDED, "converter": bool}],
+        },
+    ),
+    (
         (models.FilePathField, ),
         [],
         {
         if value == datetime.date.today:
             return "datetime.date.today"
         # All other callables get called.
-        return repr(value())
-    else:
-        return repr(value)
+        value = value()
+    # Now, apply the converter func if there is one
+    if "converter" in options:
+        value = options['converter'](value)
+    # Return the final value
+    return repr(value)
 
 
 def introspector(field):