I'm not sure I understand your question, but I guess this can help
you.
Lets say that you want to Blah.get().title to return title in upper
case.
You create a property as follows:
class Blah(db.Model):
"""Example"""
_name = db.StringProperty()
_title = db.StringProperty()
_address = db.StringProperty()
def gettitle(self):
return self._title.upper()
def settitle(self, x):
self._title = x
title = property(gettitle, settitle)
On Oct 23, 2:21 pm, Nefarious <[EMAIL PROTECTED]> wrote:
> Newbie question here...
>
> Say I have model like the below:
>
> class Blah(db.Model):
> """Example"""
>
> name = db.StringProperty()
> title = db.StringProperty()
> address = db.StringProperty()
>
> How would I modify the output from the datastore before it gets to the
> caller? So, I want to modify the output of a call like this:
> Blah.get().title and do some custom code on the title property. I
> assume I subclass and override a get method somewhere, but I am not
> clear where. I assumed I would subclass StringProperty but that
> doesn't seem to have a method I need for this operation. Any ideas?
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---