Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-taggit
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d64a32bd
authored
Oct 02, 2010
by
Alex Gaynor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide docs.
parent
d133ea62
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
docs/api.txt
+7
-1
docs/changelog.txt
+11
-0
taggit/managers.py
+3
-3
No files found.
docs/api.txt
View file @
d64a32bd
...
...
@@ -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)
...
...
docs/changelog.txt
View file @
d64a32bd
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
~~~~~
...
...
taggit/managers.py
View file @
d64a32bd
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment