rohitjain-rj / django-tagging

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

add_tag() does not support tags with spaces properly #198

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
add_tag calls parse_tag_input which, for tag names with spaces in them,
assumes the tag is delimited by spaces and then after that checks the
length of the parsed input which ends up being greater than 1. This causes
an error to be raised saying that multiple tags were given when in reality
only one tag was given.

Original issue reported on code.google.com by IanMLe...@gmail.com on 1 Jun 2009 at 3:34

GoogleCodeExporter commented 9 years ago
This will also be true of the AdminTagForm which will not allow editing of tags 
with
spaces in them.

Original comment by IanMLe...@gmail.com on 1 Jun 2009 at 3:39

GoogleCodeExporter commented 9 years ago
Quick solve:
Tag.objects.add_tag(obj, '"%s"' % tag_name )

Original comment by kalys.os...@gmail.com on 30 May 2010 at 3:51