Python Django: Accessing Google App Engine URL - Post then
I have something like this:
class CategoryPage (webapp.RequestHandler):
def get(self):
** DO SOMETHING HERE **
def post(self):
** DO SOMETHING HERE **
** RENDER THE SAME AS get(self)
The question is how, after processing the posted data, can I display the same information as the get (self) function?
a source to share
create_object(request, form_class=FormClass,
post_save_redirect=reverse('-get-url-handler-',
kwargs=dict(key='%(key)s')))
I am using the above django shortcut from shared views where you can specify a post save redirect get in your case. There are some more examples in this snippet. BTW, I assumed you are using django (helper or patch) with an application engine based on the title of the question. If you're using a patch for an application, check out the views.py view in the sample application myapp. The add_person handler does what you are looking for.
a source to share
Actually, your code is not Django, but webapp (Google mini - "framework"). Please read the Django documentation: http://docs.djangoproject.com/
Django generic views are only accessible with app-engine-patch. The assistant does not support them. You can see the app-engine-patch example project to learn more about Django on App Engine: http://code.google.com/p/app-engine-patch/