Hi,

I am a bit confused about the best practices for using the django-tagging.
>From the docs/overview.txt. It seems you can either have the tags
stored inside a model OR you can have them stored on the tagging_tag
table.

E.g.
   class Link(models.Model):
       ...
       def add_tag(self, tagname):
          Tag.objects.add_tag(self, tagname)
       def get_tags(self):
          Tag.objects.get_for_object(self)

vs

   class Link(models.Model):
       ...
       tags = TagField()

Assuming the tags are common and have significant overlap across the
objects, it seems better to store them outside the model?
I guess the advantage of using TagField is you can generate a
ModelForm automatically and be represented by a
tagging.forms.TagField. But then you can also workaround it by having
something like

class LinkForm(forms.ModelForm):
   tags = TagField()
   class Meta:
      model = LinkForm

But you probably have to do some manual work to populate this field
from your views by calling the get_tags() to fill this out?

Just curious on what your experiences are.

-Aaron

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to