I think your get_key method needs a return in there.

class DerefModel(db.Model):
    def get_key(self, prop_name):
        getattr(self.__class__, prop_name).get_value_for_datastore(self)



On Fri, Feb 27, 2009 at 3:51 PM, Bill <billk...@gmail.com> wrote:

>
> Alex,
> Do you mean something like this:
>
> http://appengine-cookbook.appspot.com/recipe/getting-dbreferenceproperty-key-without-loading-entity
> If so, let me know if it doesn't work.
> -Bill
>
> On Feb 26, 5:32 pm, Alex Popescu <the.mindstorm.mailingl...@gmail.com>
> wrote:
> > Hi,
> >
> > I've read on the group that somebody has extended the db.Model to
> > automatically provide access to the referenced entity key (i.e. if the
> > model defines a ReferenceProperty then the Model will automatically
> > provide access to the referenced entity key -- the value that is
> > actually stored).
> >
> > While I do know how to write the code to get the referenced entity
> > key, I have no idea how can I enhance db.Model to automatically
> > provide this feature.
> >
> > I'd appreciate any hints on how to get this functionality (or even
> > better the implementation). Many thanks in advance,
> >
> > ./alex
> > --
> > Cloud Now:http://The.DailyCloud.net
> >
>


-- 
=======================================
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
=======================================

--~--~---------~--~----~------------~-------~--~----~
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