Can you try using req.put()? See the example here:

On Fri, Apr 23, 2010 at 7:24 PM, Delacroy <[email protected]> wrote:

> I don't know why my post method is not writing anything to the
> datastore!
>
> Current URL:
> /request
>
> Model:
> class Requests(db.Model):
>    nickname = db.StringProperty()
>    service = db.StringProperty()
>
> Template:
> {% block content %}
> <b>Make a new request:</b>
> <form action="/makerequest" method="post">
>        <div><label for="nickname">Username: </label><input type="text"></
> div>
>        <div><label for="service">Service: </label><input type="text"></div>
>        <div><input type="submit" value="Submit request"></div>
> </form>
> {% endblock %}
>
> Handler:
> class MakeRequestHandler(webapp.RequestHandler):
>        def post(self):
>                _nickname = self.request.get('nickname')
>                _service = self.request.get('service')
>                #req.pub_date = datetime.datetime.now()
>                req = Requests(nickname = _nickname,
>                                                service = _service,)
>                db.put(req)
>                self.redirect('/request')
>
> --
> 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]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Ikai Lan
Developer Relations, Google App Engine
Twitter: http://twitter.com/ikai
Delicious: http://delicious.com/ikailan

----------------
Google App Engine links:
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
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.

Reply via email to