Commits

Anonymous committed b4f1253

model_form now converts a DateProperty into a DateField. Fixes #41.

Thanks nicois for patch.

Comments (0)

Files changed (1)

wtforms/ext/appengine/db.py

     if prop.auto_now or prop.auto_now_add:
         return None
 
-    return f.DateTimeField(format='%Y-%m-%d', **kwargs)
+    return f.DateField(format='%Y-%m-%d', **kwargs)
 
 
 def convert_TimeProperty(model, prop, kwargs):
     | DateTimeProperty   | DateTimeField     | datetime     | skipped if       |
     |                    |                   |              | auto_now[_add]   |
     +--------------------+-------------------+--------------+------------------+
-    | DateProperty       | DateTimeField     | date         | skipped if       |
+    | DateProperty       | DateField         | date         | skipped if       |
     |                    |                   |              | auto_now[_add]   |
     +--------------------+-------------------+--------------+------------------+
     | TimeProperty       | DateTimeField     | time         | skipped if       |