Skip to content

Instantly share code, notes, and snippets.

@pydanny
Created November 27, 2011 23:30
Show Gist options
  • Save pydanny/1398440 to your computer and use it in GitHub Desktop.
Save pydanny/1398440 to your computer and use it in GitHub Desktop.
My awesome CBV form fix
class CrazyViewWithTwoForms(DetailView):
def post(self, request, *args, **kwargs):
# mock the GET action in a post request.
# Doesn't need to do anything but this.
# Is boilerplate but works.
# Clearly designed by and for smart people. ;)
return self.get(request, *args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment