Extending Django-tagging, adding extra field to each tag?
We're coding together a Django app to handle reviews of newspaper articles.
Each newspaper article model will an arbitrary number of tags associated with it. Also, each tag will have an optional ranking (0 to 10).
I was thinking of using django-tagging to do this (http://code.google.com/p/django-tagging/), but I'm 开发者_高级运维not sure of the best way to add the ranking to the system. Should I extend django-tagging somehow? (Not sure if this is possible, without changing django-tagging's actual code?). Or is there a better way of achieving this?
Cheers, Victor
I have the same problem as you. If I don't find a better aproach my solution would this:
class TagExtension(models.Model):
name = models.CharField(max_length=50, primary_key='True')
ranking = models.IntegerField()
精彩评论