Here is my code:
# Database Model
class Employee(db.Model):
id = db.IntegerProperty(required=True)
name = db.StringProperty(required=True)
password = db.IntegerProperty(required=True)
delivery_type = db.StringProperty(choices=set(["pickup", "mail",
"deposit"]))
# following variables has been assigned with proper data
res = Employee.gql("WHERE id = :1", some_user_id)
for r in res:
r.delivery_type = some_type
db.put(res)
# but when I later checked out, to see if I updated the delivery type
using template, it gives me None value
{% for r in res %}
<p>{{ r.id }}</p>
<p>{{ r.name }}</p>
<p>{{ r.delivery_type }}</p>
{% endfor %}
Can anyone tell me what's the problem is?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---