Ticket #3005: forms.patch
File forms.patch, 1.8 KB (added by , 18 years ago) |
---|
-
forms.txt
161 161 162 162 # Check for validation errors 163 163 errors = manipulator.get_validation_errors(new_data) 164 manipulator.do_html2python(new_data) 164 165 if errors: 165 166 return render_to_response('places/errors.html', {'errors': errors}) 166 167 else: 167 manipulator.do_html2python(new_data)168 168 new_place = manipulator.save(new_data) 169 169 return HttpResponse("Place created: %s" % new_place) 170 170 … … 217 217 218 218 # Check for errors. 219 219 errors = manipulator.get_validation_errors(new_data) 220 manipulator.do_html2python(new_data) 220 221 221 222 if not errors: 222 223 # No errors. This means we can save the data! 223 manipulator.do_html2python(new_data)224 224 new_place = manipulator.save(new_data) 225 225 226 226 # Redirect to the object's "edit" page. Always use a redirect … … 312 312 if request.method == 'POST': 313 313 new_data = request.POST.copy() 314 314 errors = manipulator.get_validation_errors(new_data) 315 manipulator.do_html2python(new_data) 315 316 if not errors: 316 manipulator.do_html2python(new_data)317 317 manipulator.save(new_data) 318 318 319 319 # Do a post-after-redirect so that reload works, etc. … … 394 394 if request.method == 'POST': 395 395 new_data = request.POST.copy() 396 396 errors = manipulator.get_validation_errors(new_data) 397 manipulator.do_html2python(new_data) 397 398 if not errors: 398 manipulator.do_html2python(new_data)399 399 400 400 # Send e-mail using new_data here... 401 401