Sorry, sorry, sorry. I had an error in my code.
Thank you very much. See you. David. On Oct 27, 7:55 pm, "Nick Johnson (Google)" <[email protected]> wrote: > On Tue, Oct 27, 2009 at 6:47 PM, david <[email protected]> wrote: > > > OK, but when I write: > > > for r in rutas: > > self.response.out.write("""<id>%s</id></ruta>""" % r.key > > ()) > > > I always get the same value. Why? > > Are you sure it's the same value? Key strings for a given app and kind will > all have an identical prefix, but will differ towards the end. > > -Nick Johnson > > > > > > > On Oct 27, 7:14 pm, "Nick Johnson (Google)" <[email protected]> > > wrote: > > > Hi david, > > > > You need to call .key() on your model - it's a method, not a property. > > > > -Nick Johnson > > > > On Tue, Oct 27, 2009 at 5:30 PM, david <[email protected]> wrote: > > > > > I'm programming with the DataStore of GAE and am trying to get the > > > > unique identifier for instances of a > > > > db.Model, how do you get? > > > > > For example: > > > > > class Ruta(db.Model): > > > > titulo = db.StringProperty() > > > > KML = db.BlobProperty() > > > > > class mostrarIndice(webapp.RequestHandler): > > > > def get(self): > > > > rutas = db.GqlQuery ("SELECT * FROM Ruta") > > > > for r in rutas: > > > > self.response.out.write("""<id>%s</id></ruta>""" % ¿?¿?¿?) > > > > > I have tried r.key () but I get the same value for all instances. > > > > > Thank you very much. > > > > See you. > > > > David. > > > > -- > > > Nick Johnson, Developer Programs Engineer, App Engine > > > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration > > Number: > > > 368047 > > -- > Nick Johnson, Developer Programs Engineer, App Engine > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: > 368047 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
