Permalink
Browse files

Fixed #3005 -- Applied trivial docs patch for "oldforms" use of do_h…

…tml2python.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
malcolmt committed Feb 13, 2007
1 parent 0fabbf8 commit ffa0d274625d21e6c4c7fa146413ce951b669b72
Showing with 4 additions and 4 deletions.
  1. +4 −4 docs/forms.txt
View
@@ -173,10 +173,10 @@ creation view that takes validation into account::
# Check for validation errors
errors = manipulator.get_validation_errors(new_data)
+ manipulator.do_html2python(new_data)
if errors:
return render_to_response('places/errors.html', {'errors': errors})
else:
- manipulator.do_html2python(new_data)
new_place = manipulator.save(new_data)
return HttpResponse("Place created: %s" % new_place)
@@ -229,10 +229,10 @@ Below is the finished view::
# Check for errors.
errors = manipulator.get_validation_errors(new_data)
+ manipulator.do_html2python(new_data)
if not errors:
# No errors. This means we can save the data!
- manipulator.do_html2python(new_data)
new_place = manipulator.save(new_data)
# Redirect to the object's "edit" page. Always use a redirect
@@ -324,8 +324,8 @@ about editing an existing one? It's shockingly similar to creating a new one::
if request.method == 'POST':
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
+ manipulator.do_html2python(new_data)
if not errors:
- manipulator.do_html2python(new_data)
manipulator.save(new_data)
# Do a post-after-redirect so that reload works, etc.
@@ -406,8 +406,8 @@ Here's a simple function that might drive the above form::
if request.method == 'POST':
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
+ manipulator.do_html2python(new_data)
if not errors:
- manipulator.do_html2python(new_data)
# Send e-mail using new_data here...

0 comments on commit ffa0d27

Please sign in to comment.