Topic tags
This is feature request for adding tags for topics.
Categories are good way to organize topics, but tags would add much more flexibility.
@nitely please share your thoughts on implementation. How will https://github.com/nitely/django-hooks come into play?
My thoughts on this are along the following lines:
- Make tags discoverable ala StackOverFlow
- Add tags within the creation topic form
- Clicking a tag (at any place the appear) should take the user to a topic list filtered by that tag
- I think there should not be a fixed set of tags, I mean, users should just make them up, otherwise they accomplish the same as categories. Although, a topic can belong to many tags and can not belong to many categories, so it may make sense to have a fixed set. I think supporting both options would not be much more effort (but IMO the first one makes more sense)
- The form field should have an auto complete built on top of haystack.
Adding tags to the search makes little sense, since they are not discoverable that way (something I saw in your PR).
django-hooks can make the topic creation form extensible, and provide places to insert code within the template (ie: show the tags, add item to menu, etc). Any model can be extended via a OneToOneField.
Aside from the fact that it's incompatible with django-hooks, any opposition to using django-taggit? It makes since to me to use it rather than re-create the wheel.
I agree with most of what you have written. Tags should not be confined to a fixed set.
I disagree regarding search. Adding tags to the indexed data gives users the ability to search based on those terms, rather than having to know a tag URL.
Would the UI be a prerequisite for merging this functionality? I intend to use Spirit to replace an existing backend forums service, so all I need is the backend and a RESTful API.
Honestly, I don't care much about how plugins are implemented, they are out of my hands. I can only give some advice. It won't get merge, since it is a plugin (a pluggable app actually), people will install it or not.
django-hooks doesn't go deep enough to cover model/search index changes. It seems to be more cosmetic than anything else. Any plans to support more robust changes? Any chance you've considered following django-oscar's model, supporting the "forking" of apps?
It seems to be more cosmetic than anything else.
Django let you extend urls (by just overriding them), react to signals, override templates, extend models through FK and friends. django-hooks adds extensible templates and forms. What else do you need?
Any chance you've considered following django-oscar's model, supporting the "forking" of apps?
How would it help to extend the search functionality?
I've explored more and see the architecture. Adding the basic tagging model seems pretty straightforward.
Oscar's forking model allows the entire app to be overridden by another, allowing some modules to be replaced with user-created modules. What I am missing is a method to extend TopicIndex to add the tags. It seems my only option is to replace the template (either via django-hooks or ensuring my project's template directory is loaded first); however, I don't see an obvious method of adding a field to TopicIndex.
It's 3AM here in Cambridge, so let me know if I'm being dense.
I'd have to dig up how TopicIndex can be extended. I will go through haystack docs tomorrow and let you know.
Oscar's forking model allows the entire app to be overridden by another
Spirit does not aim to have overridable apps, you should be able to extend it, add features, but not remove or swap parts of the core, except for what Django allows (ie: the user model).
It's 3AM here in Cambridge, so let me know if I'm being dense.
it's 5AM here in Bs.As, haha
I'd have to dig up how TopicIndex can be extended. I will go through haystack docs tomorrow and let you know.
I've an idea how this can be done. I'll work on it over the weekend.
I've created a hook for haystack, seems to be working. Usage, template.txt can be extended with a template hook.