diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-09 13:04:05 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-09 13:04:05 +0000 |
| commit | 1ca9ceda599c52d9692eab82e17797e4006c93f2 (patch) | |
| tree | f62d25ddda4b99da246cf372c621c1f2e06f1c7e /docs | |
| parent | 8c59905033e1a833f6c2f6f7aa7abad6d68926da (diff) | |
Refs #15241 -- Further clarifications to the generic view migration docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15481 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/generic-views-migration.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/topics/generic-views-migration.txt b/docs/topics/generic-views-migration.txt index cac3f29844..ab6b87e6d1 100644 --- a/docs/topics/generic-views-migration.txt +++ b/docs/topics/generic-views-migration.txt @@ -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) |
