Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. class BooksWizard(FormWizard):
  2.     def done(self, request, form_list):
  3.     formstep0 = BooksForm()
  4.     if request.POST:
  5.         formstep0 = BooksForm(title = request.0-title,
  6.             authors = request.0-authors)
  7.         if formstep0.is_valid():
  8.         formstep0.save()
  9.         formstep0 = BooksForm()
  10.     return HttpResponseRedirect('/')
  11.     def process_step(self, request, form, step):
  12.     if request.method == 'POST':
  13.         self.extra_context['book_title'] = request.POST['0-title']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement