summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-10-23 07:51:29 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-10-23 07:51:29 +0000
commit28ff6ecbda950f774adb5c10e444db935c70646f (patch)
tree72eb14448afbf5f9a6eac726c57d2bab36be2b10 /docs
parent86404743d53bb6c53779879e10dc95e6e41f06fa (diff)
Fixed #2931 -- Use request.method == 'POST' where appropriate in the examples.
Thanks, David Schein. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3914 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/forms.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/forms.txt b/docs/forms.txt
index 767225cfd4..ceb7a1addd 100644
--- a/docs/forms.txt
+++ b/docs/forms.txt
@@ -211,7 +211,7 @@ Below is the finished view::
def create_place(request):
manipulator = Place.AddManipulator()
- if request.POST:
+ if request.method == 'POST':
# If data was POSTed, we're trying to create a new Place.
new_data = request.POST.copy()
@@ -309,7 +309,7 @@ about editing an existing one? It's shockingly similar to creating a new one::
# Grab the Place object in question for future use.
place = manipulator.original_object
- if request.POST:
+ if request.method == 'POST':
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
if not errors:
@@ -391,7 +391,7 @@ Here's a simple function that might drive the above form::
def contact_form(request):
manipulator = ContactManipulator()
- if request.POST:
+ if request.method == 'POST':
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
if not errors: