django / django-contrib-comments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discussion object feature?

yeago opened this issue · comments

Would anyone be interested in a "Discussion object". It would be pluggable like Comments and you could attach things to it. The only thing I can imagine for now would be 'closed' discussions. Otherwise, its kind of awkward because you have to roll this same 'closed' feature into every app that may use comments (blogs, forums, etc)

You mean a mixin class? You can always try and show us some code, we'll see...

class Discussion(models.Model):
   object = GenericForeignKey()
   closed = models.BooleanField(default=False)

I'm thinking its just a parent class to hold attributes about an entire discussion. It links to a content object in the same way that comments do now. You would create one alongside your current content objects. From there, you could for example close discussions across types. If it was pluggable I could imagine people tacking on other attributes such as restricting access to discussions, etc.

The question is: would such a utility generic enough to warrant inclusion here? In any case, the way to go forward would be to implement it either in a project of yours or as another external app, and after that propose it for inclusion. It's very difficult to decide without a real implementation and at least one real use of it.