How make tags with properties in Django?

安稳与你 提交于 2019-11-28 06:51:10

问题


The django-tagging app provides basic tagging functionality. I need each tag also to have properties (category, description, etc.), basically a related table. What's your recommendation, should I try to get this with django-tagging or implement "my tagging" from scratch?


回答1:


Create a model to hold your tag metadata.

With a tag instance you can look up the model instance to learn the category, description, etc. You could even tag the metadata instance with the tag if you find that makes things easier.



来源:https://stackoverflow.com/questions/3542388/how-make-tags-with-properties-in-django

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!