django / django-contrib-comments

BSD 3-Clause "New" or "Revised" License
619 stars 197 forks source link

Discussion object feature? #90

Open yeago opened 8 years ago

yeago commented 8 years ago

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)

claudep commented 8 years ago

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

yeago commented 8 years ago
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.

claudep commented 8 years ago

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.