Hi all,
I'm in the process of updating one of my GAE app data sets to include a
dictionary-esque object within the data store. To achieve this, I have
written some helper functions that convert key/value pairs to single
entities within a list that are split by a keyword.
This seems to work fine locally on a development server, but when I upload
this code to GAE, the app produces an error.
I am doing the following in my model definition:
class Event(db.Model):
...
intTicketUrls = db.ListProperty(str)
intTicketPrices = db.ListProperty(str)
def _get_ticketPrices(self):
return {x.split('_HAS_')[0]:x.split('_HAS_')[1] for x in
self.intTicketPrices}
def _set_ticketPrices(self, inputDict):
if not self.intTicketPrices:
self.intTicketPrices = list()
self.intTicketPrices = [key+'_HAS_'+inputDict[key] for key in
inputDict]
ticketPrices = property(_get_ticketPrices, _set_ticketPrices)
The line that causes the error is the return from _get_ticketPrices.
Does anyone have any idea why this is happening? Are dictionary
comprehensions supported correctly in the production Python environment?
Thanks
Sean Bedford
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/SEUKdNrDu9sJ.
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.