Created
May 21, 2012 16:40
-
-
Save omarish/2763195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from foo.forms import MyForm | |
def myview(request): | |
form = MyForm() | |
if request.POST: | |
form = MyForm(request.POST) | |
if form.is_valid(): | |
# Do something with the contents, perhaps save the form | |
form.save() # You can call this sometimes. | |
return render_to_response("success page...", {}) | |
return render_to_response("original page with form", { | |
'form': form | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment