Opened 11 years ago

Closed 11 years ago

#10158 closed (invalid)

error in forms docs

Reported by: turadg Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


on this page,

there is a function shown,

def contact(request):

if request.method == 'POST': # If the form has been submitted...

form = ContactForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass

# Process the data in form.cleaned_data
# ...
return HttpResponseRedirect('/thanks/') # Redirect after POST


form = ContactForm() # An unbound form

return render_to_response('contact.html', {

'form': form,


the render_to_response method is missing the 'request' parameter.

also, I implore you to allow users to comment like the PHP docs do.

Change History (1)

comment:1 Changed 11 years ago by James Bennett

Resolution: invalid
Status: newclosed

render_to_response doesn't require a "request" parameter.

Note: See TracTickets for help on using tickets.
Back to Top