I'm not sure if this would need to be done on the Tag model or its manager.
However, I would
like to see get_absolute_url support for a tag. Given that we can use named
urls and this app
offers a generic view, this becomes not too bad with something like:
url(r'^widgets/tag/(?P<tag>[^/]+)/$',
tagged_object_list,
dict(model=Widget, paginate_by=10, allow_empty=True,
template_object_name='widget'),
name='widget_tag_detail'),
class Tag(models.Model):
def get_absolute_url(self, tag):
return ('widget_tag_detail', (), { 'tag': tag })
or something similar. I'm just throwing that out there. Perhaps I'm overlooking
some snag. I'm
sure folks might want TaggedItem also, but provided they know the model of the
TaggedItem,
they can build that into their tagged model.
Original issue reported on code.google.com by aez...@gmail.com on 22 May 2008 at 12:40
Original issue reported on code.google.com by
aez...@gmail.com
on 22 May 2008 at 12:40