Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refs #15241 -- Further clarifications to the generic view migration d…

…ocs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15481 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1ca9ceda599c52d9692eab82e17797e4006c93f2 1 parent 8c59905
Russell Keith-Magee freakboy3742 authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 docs/topics/generic-views-migration.txt
9 docs/topics/generic-views-migration.txt
View
@@ -145,9 +145,14 @@ processors when rendering template content.
Class-based views don't provide a ``context_processors`` argument.
Instead, you subclass the view, overriding
-:meth:`TemplateResponseMixin.render_to_response()`. For example::
+:meth:`TemplateResponseMixin.render_to_response()`, and passing in
+a context instance that has been instantiated with the processors
+you want to use. For example::
class MyListView(ListView):
def render_to_response(self, context, **kwargs):
return super(MyListView, self).render_to_response(
- RequestContext(self.request, context, processors=[custom_processor]), **kwargs)
+ RequestContext(self.request,
+ context,
+ processors=[custom_processor]),
+ **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.