pallets-eco / wtforms-appengine

WTForms integration for Google App Engine
https://wtforms-appengine.readthedocs.io
Other
42 stars 16 forks source link

KeyPropertiesField data property is a Model object #1

Closed shday closed 8 years ago

shday commented 10 years ago

Hi,

Not sure if this is an issue or intended behavior. It seems that KeyPropertiesField should be converting form data into Key objects (not Model objects). This is also what the docstring of ModelConverter indicates.

In any case, it would be nice if this were an option at least. I will probably fork and work on it myself, but I was hoping to get your thoughts first.

Thanks,

Stephen

davidstackio commented 9 years ago

@shday I was wondering the same thing - did you ever get it to do the expected behavior of only converting to a Key object (and not a Model object)?

shday commented 9 years ago

@dhstack I forked the project and changed the behavior to what it should be: https://github.com/shday/wtforms-appengine/tree/keyfield.

But it's been a while since I used the library...

davidstackio commented 9 years ago

@shday Thanks for the link - I was able to fix my issue (form with radio buttons derived from a KeyProperty field in ndb) after applying it. Thank you.

You should submit a pull request to get it included in the master branch.