Pro Django by Marty Alchin

Pro Django by Marty Alchin

Author:Marty Alchin [Alchin, Marty]
Language: eng
Format: epub, pdf
Tags: Computers, Programming, Web, Open Source, Web Programming
ISBN: 9781430258094
Publisher: Apress
Published: 2013-07-10T04:00:00+00:00


class PendFormView(FormView):

pend_button_name = 'pend'

def post(self, request, *args, **kwargs):

"""

Handles POST requests with form data. If the form was pended, it doesn't follow

the normal flow, but saves the values for later instead.

"""

if self.pend_button_name in self.request.POST:

form_class = self.get_form_class()

form = self.get_form(form_class)

self.form_pended(form)

else:

super(PendFormView, self).post(request, *args, **kwargs)

# Custom methods follow

def get_import_path(self, form_class):

return '%s.%s' % (form_class.__module__, form_class.__name__)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.