Most of the time, the errors you get from your model properties will
happen when you're saving data. For instance, if you try saving a
string as an IntegerProperty, that will result in an error.

The one exception (no pun intended) is ReferenceProperty. If you have
lots of references and you're not completely careful about leaving in
bad references, it's common to be greeted with an error like
"TemplateSyntaxError: Caught an exception while rendering:
ReferenceProperty failed to be resolved".

And this is if there's only one bad reference in the view. D'oh.

I could write a try/except block to try to access all the reference
properties and delete them if an exception is raised, but this
functionality could surely be useful to many other developers if there
was a more generic method than the one I'd be capable of writing. I
imagine it would take a list of model types and try to access each
reference property of each entity in each model, setting the property
to None if an exception is raised.

I'll see if I can do this myself, but it would definitely help to have
some suggestions/snippets to get me started.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to