Opened 7 years ago

Closed 7 years ago

#6908 closed (wontfix)

Decoupling of hardcoded Comment class

Reported by: miohtama Owned by: nobody
Component: contrib.comments Version: master
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: UI/UX:

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.

Change History (1)

comment:1 Changed 7 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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.

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