Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Correct docs on setup of JSONResponseMixin example #282

Merged
merged 1 commit into from

2 participants

Preston Holmes Aymeric Augustin
Preston Holmes
Collaborator

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

Preston Holmes ptone 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
Collaborator

refs #18701

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

    Update docs/topics/class-based-views/index.txt

    ptone authored
    View class does not have a render_to_response method - so does not make sense for this mixin
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 docs/topics/class-based-views/index.txt
6 docs/topics/class-based-views/index.txt
View
@@ -119,11 +119,11 @@ For example, a simple JSON mixin might look something like this::
# -- can be serialized as JSON.
return json.dumps(context)
-Now we mix this into the base view::
+Now we mix this into the base TemplateView::
- from django.views.generic import View
+ from django.views.generic import TemplateView
- class JSONView(JSONResponseMixin, View):
+ class JSONView(JSONResponseMixin, TemplateView):
pass
Equally we could use our mixin with one of the generic views. We can make our
Something went wrong with that request. Please try again.