1
0
mirror of https://github.com/django/django.git synced 2025-03-31 11:37:06 +00:00

Merge pull request #282 from ptone/patch-1

Corrected docs on setup of JSONResponseMixin example
This commit is contained in:
Aymeric Augustin 2012-08-18 01:30:10 -07:00
commit 0d1653395b

View File

@ -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