#3091 closed enhancement (fixed)
[patch] Views in django.contrib.comments should allow 'extra_context' and 'context_processors' arguments
Description ¶
The current django.contrib.comments view code does not allow passing in additional context.
This patch adds extra_context and context_processors parameters to the django.contrib.comments views. I had the need to pass additional context for my templates into the comments "generic" views, and wanted to be able to pass the context in the same way I can for the other generic views. This patch to comments.py allows this.
With this patch, comments work the same way as other generic views. For example, to pass additional context in you may do:
urlpatterns = patterns('', (r'^comments/', include('django.contrib.comments.urls.comments'), {'extra_context': {'extra': 123}}), )
Change History (8)
by , 18 years ago
Attachment: | comments.patch added |
---|
comment:1 by , 18 years ago
Component: | Contrib apps → django.contrib.comments |
---|
comment:2 by , 18 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 17 years ago
Attachment: | ticket_3091__rev_6186.diff added |
---|
All comment views now support 'extra_context' and 'context_processors' arguments.
comment:3 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Summary: | Patch to add 'extra_context' and 'context_processors' to django.contrib.comments → [patch] Views in django.contrib.comments should allow 'extra_context' and 'context_processors' arguments |
Triage Stage: | Accepted → Ready for checkin |
Diff is now from proper location. (trunk)
No backwards incompatible changes.
This change seems like a good idea, so promoting directly to 'Ready for checkin'. I won't be offended if it gets bumped to design decision needed though.
comment:4 by , 17 years ago
Keywords: | sprintsept14 added |
---|
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch to django.contrib.comments.views methods