I think this is a bug: (http://code.google.com/p/googleappengine/
issues/detail?id=3148)
djangoforms.StringListProperty's make_value_from_form() can handle an
empty form value, returning an empty list. The problem is CharField's
clean() will reject an empty field when required=True.
In other words, StringListProperty (well, ListProperty) should not
force required=True. I worked around this problem by creating my own
subclass as follows:
class MyStringListProperty(db.StringListProperty):
def __init__ (self, *args, **kwargs):
super(MyStringListProperty, self).__init__(*args, **kwargs)
# allow an empty list: djangoforms.StringListProperty's
make_value_from_form() can handle an
# empty value, returning an empty list; leaving as-is is rejected
in CharField's clean()
self.required = False
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.