diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-12-04 19:58:49 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-12-04 19:58:49 +0000 |
| commit | 040f2272e0aec724a36e7abda445b61ee065a8f1 (patch) | |
| tree | 8ae714be4e513663470eaf1d3d8026a92a5cd2f8 /docs/forms.txt | |
| parent | 2a58209ff2b7c47245c9d12985ac7581e97988d1 (diff) | |
[multi-db] Merged trunk to 3950. Some tests still failing.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/forms.txt')
| -rw-r--r-- | docs/forms.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/forms.txt b/docs/forms.txt index 767225cfd4..4a4ba37289 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: @@ -579,7 +579,7 @@ fails. If no message is passed in, a default message is used. ``ValidateIfOtherFieldEquals`` Takes three parameters: ``other_field``, ``other_value`` and ``validator_list``, in that order. If ``other_field`` has a value of - ``other_vaue``, then the validators in ``validator_list`` are all run + ``other_value``, then the validators in ``validator_list`` are all run against the current field. ``RequiredIfOtherFieldNotGiven`` |
