Hi guys! I'm wanting to implement what you can see at the django-tagging wiki page: a property interface to an object's tags.
I got this working on my blog, but surprisingly I seem unable to get this working now. In my model definition, I have the following, beside other stuff: def _get_tags(self): return Tag.objects.get_for_object(self) def _set_tags(self, tag_list): Tag.objects.update_tags(self, tag_list) tagged = property(_get_tags, _set_tags) Then... Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from tagging.models import Tag >>> from anuncioslanzarote.anuncios.models import Entry >>> e = Entry.objects.get(pk=1) >>> Tag.objects.get_for_object(e) [<Tag: piso>, <Tag: valterra>] >>> e.tagged Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'Entry' object has no attribute 'tagged' Can't really tell why this happens. e.tagged is calling Tag.objects.get_for_object(), but is not getting the same result. Any ideas...? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---