On Thu, Jun 4, 2009 at 5:24 PM, NealWalters <[email protected]>wrote:
>
> Thanks, this worked:
>
> mytable.put()
> savekey = mytable.key()
> self.response.out.write(savekey)
> return
>
> I thought it was a property, because I used it in a template like
> this:
> <td><a href="updWorker?key={{wrkr.key}}"> {{forloop.counter}}
> </a></td>
> This allowed me to create a clickable item to go from a report/listing
> to an update detail query/update page.
>
> Should I put code {{wrkr.key() }} in the template? Or does it
> matter?
Django automatically invokes 0-argument functions. The function call syntax
won't work.
-Nick Johnson
>
>
> Here's the result of my UUID experiment - in case anybody want to
> know:
>
> import uuid
>
>
> #guids sometime start with digits, but "key_name" cannot
> guid = 'a' + str(uuid.uuid4())
>
> mytable = MyTable(key_name=guid)
> mytable.dateTimeCreated = datetime.datetime.now()
> mytable.dateTimeModified = mytable.dateTimeCreated
> mytable.put()
>
> # when I view the table, it this does not set "Key" but a field
> called "Key Name".
> # instead of the numeric "ID".
> # Later, the data can be retrieved as follows:
> mytable = MyTable.get_by_key_name(guid)
>
>
> Thanks,
> Neal Walters
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---