Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Correct docs on setup of JSONResponseMixin example #282

Merged
merged 1 commit into from over 1 year ago

2 participants

Preston Holmes Aymeric Augustin
Preston Holmes
Owner

View class does not have a render_to_response method - so does not make sense for this mixin

Preston Holmes Update docs/topics/class-based-views/index.txt
View class does not have a render_to_response method - so does not make sense for this mixin
e437dd1
Preston Holmes
Owner

refs #18701

Aymeric Augustin aaugustin merged commit 0d16533 into from August 18, 2012
Aymeric Augustin aaugustin closed this August 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 17, 2012
Preston Holmes Update docs/topics/class-based-views/index.txt
View class does not have a render_to_response method - so does not make sense for this mixin
e437dd1
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  docs/topics/class-based-views/index.txt
6  docs/topics/class-based-views/index.txt
@@ -119,11 +119,11 @@ For example, a simple JSON mixin might look something like this::
119 119
             # -- can be serialized as JSON.
120 120
             return json.dumps(context)
121 121
 
122  
-Now we mix this into the base view::
  122
+Now we mix this into the base TemplateView::
123 123
 
124  
-    from django.views.generic import View
  124
+    from django.views.generic import TemplateView
125 125
 
126  
-    class JSONView(JSONResponseMixin, View):
  126
+    class JSONView(JSONResponseMixin, TemplateView):
127 127
         pass
128 128
 
129 129
 Equally we could use our mixin with one of the generic views. We can make our
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.