Opened 16 years ago

Closed 16 years ago

#5961 closed (wontfix)

Use template_name for all views in comments

Reported by: Ryan Kaskel <ryan@…> Owned by: nobody
Component: contrib.comments Version: dev
Severity: Keywords: comments
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In django.contrib.comments, all the templates locations and names are hard coded in the views themselves. It expected to find them in TEMPLATE_DIRS[X]/comments. I recently used the comments app for my own project but didn't want to put them in that directory. This trivial change adds the template_name parameter to each view function and it defaults to the template location currently in the code. You would need to make a urls.py somewhere that has views that point to the comment system's views and pass a template_name, like how most everything else works (e.g. django.contrib.auth.views.login). A simple change but it makes the system a bit more flexible for those who want to use it.

Attachments (1)

template_name_comments.diff (6.4 KB ) - added by Ryan Kaskel <ryan@…> 16 years ago.

Download all attachments as: .zip

Change History (2)

by Ryan Kaskel <ryan@…>, 16 years ago

Attachment: template_name_comments.diff added

comment:1 by James Bennett, 16 years ago

Resolution: wontfix
Status: newclosed

At some point we'll be revisiting the comments app, and at that time design issues like this will be considered. For now, though, incrementally adding things to the existing comments app is likely to make it harder to maintain/refactor in the future.

Note: See TracTickets for help on using tickets.
Back to Top