Opened 7 years ago

Closed 7 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: UI/UX:


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 7 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

render_to_response doesn't require a "request" parameter.

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