-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear how to easily add multiple tags to object #9
Comments
Use TagField. |
Hello, I've written a failing test that shows where I'm getting stuck. Hope this makes sense
The issue is in accepting multiple tags in a string from a user and adding them all to an existing set of tags. I am using TagField in my form already
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm playing with django-tagging-ng and I've written a view function to add new tags to an object
This is supposed to add a tag to an object. It works fine in the case that form.cleaned_data['tags'] contains a single tag.
I've also succeeded in adding multiple tags by iterating over parse_tag_input(form.cleaned_data['tags']) and adding a single tag in each iteration
BUT.. When the tag input is like '''one two "three four"''' I fail because parse_tag_input is treating "three four" as a single tag.
Inside add_tag it fails if a tag has multiple elements.
What is the most convenient way to append tags to a list of existing tags for an object and to handle inputs like ''' one two "three four"'''
Sorry if this isn't clear - it actually makes no sense as I read it back to myself :(
The text was updated successfully, but these errors were encountered: