I’m trying to build up an application with google app engine in python.
i’m reading this official guide: https://developers.google.com/appengine/docs/python/gettingstarted/handlingforms
from the example, it seems that i’ve to do all the data retrieving by hand
self.request.get('content')
Howevere this solution seems unconvinient, is there any way to map the form to a model (db) and have the form values put directly into this model?
example:
class PostOnBlog(db.Model):
title = db.StringProperty(required=True)
text = db.StringProperty(required=True)
now, from this can i automatically create the form? if not ok, i can construct the form by myself.
but, once i’ve to formcan i’ve the data automatically mapped to this model when a post is submit? is there any way to do it? or do i’ve to write all the self.request.get(‘par_name’)?
thanks
You can use Django on App Engine and be able to use Django’s lovely ModelForms ( see the Define Model and Form Classes for our Example part of the page )