Django

Code

Ticket #3091 (closed: fixed)

Opened 2 years ago

Last modified 10 months ago

[patch] Views in django.contrib.comments should allow 'extra_context' and 'context_processors' arguments

Reported by: eric@intellovations.com Assigned to: __hawkeye__
Milestone: 1.0 beta Component: django.contrib.comments
Version: SVN Keywords: comments, freecomment, context, extra_context, sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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}}),
)

Attachments

comments.patch (3.1 kB) - added by Eric Floehr <eric@intellovations.com> on 12/03/06 18:42:13.
Patch to django.contrib.comments.views methods
ticket_3091__rev_6186.diff (7.6 kB) - added by __hawkeye__ on 09/14/07 09:07:22.
All comment views now support 'extra_context' and 'context_processors' arguments.

Change History

12/03/06 18:42:13 changed by Eric Floehr <eric@intellovations.com>

  • attachment comments.patch added.

Patch to django.contrib.comments.views methods

12/06/06 00:42:02 changed by adrian

  • component changed from Contrib apps to django.contrib.comments.

01/30/07 02:51:22 changed by Simon G. <dev@simon.net.nz>

  • has_patch set to 1.
  • stage changed from Unreviewed to Accepted.

09/14/07 09:07:22 changed by __hawkeye__

  • attachment ticket_3091__rev_6186.diff added.

All comment views now support 'extra_context' and 'context_processors' arguments.

09/14/07 09:09:37 changed by __hawkeye__

  • owner changed from nobody to __hawkeye__.
  • status changed from new to assigned.
  • summary changed from Patch to add 'extra_context' and 'context_processors' to django.contrib.comments to [patch] Views in django.contrib.comments should allow 'extra_context' and 'context_processors' arguments.
  • stage changed from Accepted to 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.

09/14/07 15:02:45 changed by __hawkeye__

  • keywords changed from comments, freecomment, context, extra_context to comments, freecomment, context, extra_context, sprintsept14.

09/14/07 17:36:15 changed by adrian

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [6236]) Fixed #3091 -- django.contrib.comments views now accept extra_context and context_processors arguments. Thanks, Eric Floehr and hawkeye


Add/Change #3091 ([patch] Views in django.contrib.comments should allow 'extra_context' and 'context_processors' arguments)




Change Properties
Action