Skip to content

Instantly share code, notes, and snippets.

@dima-kov
Created July 27, 2017 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dima-kov/9b47f585e6592113a2ff95c3aef81ba9 to your computer and use it in GitHub Desktop.
Save dima-kov/9b47f585e6592113a2ff95c3aef81ba9 to your computer and use it in GitHub Desktop.
Return view from another one and change method
def form_invalid(self, form):
print(form.errors)
print(self.request)
# print(help(self.request))
request = self.request
request.method = 'GET'
return BookView.as_view(booking_form=form)(request=request, pk=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment