Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #212 from kevinlondon/ticket_18614_1_4

[1.4] Ticket 18614 -- Add Imports and change render_to_response to render
  • Loading branch information...
commit 498bf5c26cfba5e4c452501c82cfa8501cfc7d96 2 parents c2ff027 + c6d06a9
Florian Apolloner authored July 25, 2012

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  docs/topics/forms/index.txt
5  docs/topics/forms/index.txt
@@ -89,6 +89,9 @@ The standard pattern for processing a form in a view looks like this:
89 89
 
90 90
 .. code-block:: python
91 91
 
  92
+   from django.shortcuts import render
  93
+   from django.http import HttpResponseRedirect
  94
+
92 95
    def contact(request):
93 96
        if request.method == 'POST': # If the form has been submitted...
94 97
            form = ContactForm(request.POST) # A form bound to the POST data
@@ -99,7 +102,7 @@ The standard pattern for processing a form in a view looks like this:
99 102
        else:
100 103
            form = ContactForm() # An unbound form
101 104
 
102  
-       return render_to_response('contact.html', {
  105
+       return render(request, 'contact.html', {
103 106
            'form': form,
104 107
        })
105 108
 

0 notes on commit 498bf5c

Please sign in to comment.
Something went wrong with that request. Please try again.