| | 1 | = threadedtopics = |
| | 2 | * [source:trunk/threadedtopics browse source code] |
| | 3 | * [http://code.google.com/p/django-threadedcomments django-threadedcomments] |
| | 4 | |
| | 5 | There are [django:wiki:ForumAppsComparison several forum and comment apps] for Django. After evaluating them we decided [http://code.google.com/p/django-threadedcomments django-threadedcomments] offers the most flexibility with a couple of key features we needed. |
| | 6 | |
| | 7 | However, django-threadedcomments only offers comment threads as commonly used in blogs. In addition to that, we needed a forum/topic/thread type solution. Fortunately the way django-threadedcomments is build makes it easy to augment its functionality to that direction. |
| | 8 | |
| | 9 | Generic relations are brilliant. Django-threadedcomments uses them to allow comments and threads to be attached to any object. |
| | 10 | |
| | 11 | Our "threadedtopics" app (currently a proof-of-concept) together with threadedcomments groups comments in threads under topics, which in turn can be attached to any object with a generic relation. |
| | 12 | |
| | 13 | A major benefit from this solution is that the original functionality of threadedcomments remains, so other parts of a site can still attach comments to any objects. This way there's no need to learn and integrate another complete forum app in addition to threadedcomments. |
| | 14 | |
| | 15 | An example of how to build a forum system with threadedtopics: |
| | 16 | * Topic objects have a generic foreign key |
| | 17 | * Topic objects are attached to e.g. a !FlatPage with a "forum" template |
| | 18 | * the forum template lists topics attached to the !FlatPage with a form for starting a new topic plus an initial comment |
| | 19 | * clicking on topics might open the thread on a separate page or open it dynamically in-place using the "topic" template |
| | 20 | * the topic template uses threadedcomments to show the thread and a new comment form |
| | 21 | |
| | 22 | (The "threadedtopics" name is maybe a little misleading, since there is no |
| | 23 | topic hierarchy – it refers to the comment threads inside topics.) |
| | 24 | |
| | 25 | ---- |
| | 26 | |
| | 27 | This is all the documentation we have for now. How this evolves will be seen after we implement a complete forum solution and/or receive feedback from the django-threadedcomments author or other members of the community. |
| | 28 | |
| | 29 | ---- |
| | 30 | |
| | 31 | In [http://code.google.com/p/django-threadedcomments/issues/detail?id=14 django-threadedcomments issue #14] we made two suggestions: |
| | 32 | |
| | 33 | 1) Having the forum/topic functionality in a separate app seems to work well at least for us. An integrated solution could be easier for someone else. |
| | 34 | |
| | 35 | 2) I had to copy and customize a bunch of code from threadedcomments to my threadedtopics app to make this work, part of which could be avoided with a little code reorganization in threadedcomments. |