diff --git a/docs/api.txt b/docs/api.txt index 6da1742..9f45f19 100644 --- a/docs/api.txt +++ b/docs/api.txt @@ -4,7 +4,13 @@ The API After you've got your ``TaggableManager`` added to your model you can start playing around with the API. -.. class:: TaggableManager +.. class:: TaggableManager([verbose_name="Tags", help_text="A comma-separated list of tags.", through=None, blank=False]) + + :param verbose_name: The verbose_name for this field. + :param help_text: The help_text to be used in forms (including the admin). + :param through: The through model, see :doc:`custom_tagging` for more + information. + :param blank: Controls whether this field is required. .. method:: add(*tags) diff --git a/docs/changelog.txt b/docs/changelog.txt index 59305b0..6179b3b 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,6 +1,17 @@ Changelog ========= +1.0.0 +~~~~~ + +Unreleased. + + * *Backwards incompatible* Forms containing a :class:`TaggableManager` by + default now require tags, to change this provide ``blank=True`` to the + :class:`TaggableManager`. + + + 0.9.0 ~~~~~ diff --git a/taggit/managers.py b/taggit/managers.py index a6b7132..c7afd16 100644 --- a/taggit/managers.py +++ b/taggit/managers.py @@ -36,13 +36,13 @@ class TaggableRel(ManyToManyRel): class TaggableManager(RelatedField): - def __init__(self, verbose_name=_("Tags"), help_text=None, through=None, - blank=False): + def __init__(self, verbose_name=_("Tags"), + help_text=_("A comma-separated list of tags."), through=None, blank=False): self.use_gfk = through is None or issubclass(through, GenericTaggedItemBase) self.through = through or TaggedItem self.rel = TaggableRel(to=self.through._meta.get_field("tag").rel.to) self.verbose_name = verbose_name - self.help_text = help_text or _("A comma-separated list of tags.") + self.help_text = help_text self.blank = blank self.editable = True self.unique = False