Ticket #3005: forms.patch

File forms.patch, 1.8 KB (added by msaelices@…, 13 years ago)

Patch in documentation

  • forms.txt

     
    161161
    162162        # Check for validation errors
    163163        errors = manipulator.get_validation_errors(new_data)
     164        manipulator.do_html2python(new_data)
    164165        if errors:
    165166            return render_to_response('places/errors.html', {'errors': errors})
    166167        else:
    167             manipulator.do_html2python(new_data)
    168168            new_place = manipulator.save(new_data)
    169169            return HttpResponse("Place created: %s" % new_place)
    170170
     
    217217
    218218            # Check for errors.
    219219            errors = manipulator.get_validation_errors(new_data)
     220            manipulator.do_html2python(new_data)
    220221
    221222            if not errors:
    222223                # No errors. This means we can save the data!
    223                 manipulator.do_html2python(new_data)
    224224                new_place = manipulator.save(new_data)
    225225
    226226                # Redirect to the object's "edit" page. Always use a redirect
     
    312312        if request.method == 'POST':
    313313            new_data = request.POST.copy()
    314314            errors = manipulator.get_validation_errors(new_data)
     315            manipulator.do_html2python(new_data)
    315316            if not errors:
    316                 manipulator.do_html2python(new_data)
    317317                manipulator.save(new_data)
    318318
    319319                # Do a post-after-redirect so that reload works, etc.
     
    394394        if request.method == 'POST':
    395395            new_data = request.POST.copy()
    396396            errors = manipulator.get_validation_errors(new_data)
     397            manipulator.do_html2python(new_data)
    397398            if not errors:
    398                 manipulator.do_html2python(new_data)
    399399
    400400                # Send e-mail using new_data here...
    401401
Back to Top