- # def add_tag(self, obj, tag_name):
- # """
- # Associates the given object with a tag.
- # """
- # tag_names = parse_tag_input(tag_name)
- # if not len(tag_names):
- # raise AttributeError(_('No tags were given: "%s".') % tag_name)
- # if len(tag_names) > 1:
- # raise AttributeError(_('Multiple tags were given: "%s".') % tag_name)
- # tag_name = tag_names[0]
- # # if settings.FORCE_LOWERCASE_TAGS:
- # # tag_name = tag_name.lower()
- # tag, created = self.get_or_create(name=tag_name)
- # ctype = ContentType.objects.get_for_model(obj)
- # self.intermediary_table_model._default_manager.get_or_create(
- # tag=tag, content_type=ctype, object_id=obj.pk)
-