flebel / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

TagField and tagging.register #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If a model is registered the setter from register is used, if a TagField is
present the TagField's setter should be used.

Two ways to fix this, make the TagField register the model auotmatically
before it makes itself the setter, or make register not become the setter
if a TagField is present.

Original issue reported on code.google.com by oyvind.s...@gmail.com on 5 Feb 2008 at 12:16

GoogleCodeExporter commented 9 years ago

import tagging

class Story(models.Model):
    title = models.CharField(_('title'), max_length= 70)
SITE_ID)
    tags = TagField()

    def __unicode__(self):
        return self.title

tagging.register(Story, tag_descriptor_attr='etags')

Use tag_descriptor_attr and set it to something else than the field name.

Remember, after you make this change wrong values may be stored in the tags 
field in
the model. So even if tags show up wrong, the issue is really solved.

Original comment by oyvind.s...@gmail.com on 18 Mar 2008 at 2:37

GoogleCodeExporter commented 9 years ago
yes that fixed it, thanks.

for clarification for others the problem that this fixed is described in issue 
93

Original comment by crucialf...@gmail.com on 22 May 2008 at 7:46

GoogleCodeExporter commented 9 years ago
thanks, this fixed the error:
IntegrityError: tagging_taggeditem.object_id may not be NULL

Original comment by ammac...@gmail.com on 15 Oct 2009 at 4:48

GoogleCodeExporter commented 9 years ago
Fixed in r174

Original comment by bros...@gmail.com on 22 Jan 2010 at 9:57

GoogleCodeExporter commented 9 years ago

Original comment by bros...@gmail.com on 22 Jan 2010 at 9:58