Opened 17 years ago
Closed 17 years ago
#6908 closed (wontfix)
Decoupling of hardcoded Comment class
Reported by: | miohtama | Owned by: | nobody |
---|---|---|---|
Component: | contrib.comments | Version: | dev |
Severity: | Keywords: | hard-coded comment class | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In contrib.comments we have two hardcoded comment classes. The comment engine chooses between these using this kind of expression:
manager = self.free and FreeComment.objects or Comment.objects
Instead, a free-form class name should be given in settings. This would allow the developer to supply his own Comment class with site specific relations.
E.g.
comment_manager_factory_function = settings.COMMENT_MANAGER_ manager = comment_manager_factory_function(content_type, other_context_parameters)
I am willing to supply patch for this if you give me green light.
Note:
See TracTickets
for help on using tickets.
Various decouplings have been proposed off and on over the years; the current plan is to simply scrap the existing comments app and write a new one with a lot more flexibility. This may happen before 1.0 or it may not, and most likely people who need it will still be able to just grab a copy of the existing app and use it, but features probably won't be added to the existing app at this point.