Skip to content

Commit

Permalink
Tweak a docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Feb 9, 2012
1 parent f26b9fb commit c297d65
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ckan/model/package.py
Expand Up @@ -178,14 +178,15 @@ def add_tags(self, tags):
def add_tag_by_name(self, tag_name, vocab=None, autoflush=True):
"""Add a tag with the given name to this package's tags.
By default only free tags (tags which do not belong to any vocabulary)
are used. If the optional argument vocab is given then only tags
belonging to that vocabulary will be used.
If no tag with the given name exists, one will be created. If the
optional argument vocab is given and no tag with the given name exists
in the given vocabulary, then a new tag will be created and added to
the vocabulary.
By default the given tag_name will be searched for among the free tags
(tags which do not belong to any vocabulary) only. If the optional
argument `vocab` is given then the named vocab will be searched for the
tag name instead.
If no tag with the given name is found, one will be created. If the
optional argument vocab is given and there is no tag with the given
name in the given vocabulary, then a new tag will be created and added
to the vocabulary.
"""
from tag import Tag
Expand Down

0 comments on commit c297d65

Please sign in to comment.