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
e3ea2e60
authored
Jun 03, 2010
by
Carl Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs for tagstring-parsing updates
parent
3ca873ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
docs/changelog.txt
+10
-0
docs/forms.txt
+35
-0
docs/getting_started.txt
+1
-0
docs/index.txt
+2
-0
No files found.
docs/changelog.txt
0 → 100644
View file @
e3ea2e60
Changelog
=========
master (unreleased)
~~~~~~~~~~~~~~~~~~~
* Smarter tagstring parsing for form field; ported from Jonathan
Buchanan's `django-tagging
<http://django-tagging.googlecode.com>`_. Now supports tags
containing commas. See :ref:`tags-in-forms` for details.
docs/forms.txt
0 → 100644
View file @
e3ea2e60
.. _tags-in-forms:
Tags in forms
=============
The ``TaggableManager`` will show up automatically as a field in a
``ModelForm`` or in the admin. Tag input via the form field is parsed
as follows:
* If the input doesn't contain any commas or double quotes, it is simply
treated as a space-delimited list of tag names.
* If the input does contain either of these characters:
* Groups of characters which appear between double quotes take
precedence as multi-word tags (so double quoted tag names may
contain commas). An unclosed double quote will be ignored.
* Otherwise, if there are any unquoted commas in the input, it will
be treated as comma-delimited. If not, it will be treated as
space-delimited.
Examples:
====================== ======================================= ================================================
Tag input string Resulting tags Notes
====================== ======================================= ================================================
apple ball cat [``apple``], [``ball``], [``cat``] No commas, so space delimited
apple, ball cat [``apple``], [``ball cat``] Comma present, so comma delimited
"apple, ball" cat dog [``apple, ball``], [``cat``], [``dog``] All commas are quoted, so space delimited
"apple, ball", cat dog [``apple, ball``], [``cat dog``] Contains an unquoted comma, so comma delimited
apple "ball cat" dog [``apple``], [``ball cat``], [``dog``] No commas, so space delimited
"apple" "ball dog [``apple``], [``ball``], [``dog``] Unclosed double quote is ignored
====================== ======================================= ================================================
docs/getting_started.txt
View file @
e3ea2e60
...
...
@@ -19,3 +19,4 @@ And then to any model you want tagging on do the following::
# ... fields here
tags = TaggableManager()
docs/index.txt
View file @
e3ea2e60
...
...
@@ -11,9 +11,11 @@ for known issues with older versions of Django), and Python 2.4-2.X.
:maxdepth: 2
getting_started
forms
api
custom_through
issues
changelog
Indices and tables
==================
...
...
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