i have the following
class Image(db.Model):
author = db.UserProperty()
img = db.BlobProperty()
rating = db.RatingProperty()
tags = db.ListProperty()
when the user upload an image , he will enter a list of tags by is choose sperating by comma so how can I store them in the database using t开发者_运维百科he StringListProperty or ListProperty ??
Thanks
I think you just need to split the string.
An example:
tags = self.request.get('tags').split(',')
img_ref.tags.extend(tags)
img_ref.put()
精彩评论