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
a478bd46
authored
Apr 24, 2010
by
Alex Gaynor
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'origin/master'
parents
dbd91417
89690acc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
taggit/forms.py
+1
-1
taggit/managers.py
+2
-2
No files found.
taggit/forms.py
View file @
a478bd46
...
@@ -16,4 +16,4 @@ class TagField(forms.CharField):
...
@@ -16,4 +16,4 @@ class TagField(forms.CharField):
try
:
try
:
return
parse_tags
(
value
)
return
parse_tags
(
value
)
except
ValueError
:
except
ValueError
:
raise
forms
.
ValidationError
(
"Please provide a comma
seperate
list of tags."
)
raise
forms
.
ValidationError
(
"Please provide a comma
-separated
list of tags."
)
taggit/managers.py
View file @
a478bd46
...
@@ -69,7 +69,7 @@ class TaggableManager(object):
...
@@ -69,7 +69,7 @@ class TaggableManager(object):
return
value
return
value
else
:
else
:
# Fucking flip-floppers.
# Fucking flip-floppers.
raise
ValueError
(
"You can't combine Tag objects and strings.
'
%
s' was provided."
%
value
)
raise
ValueError
(
"You can't combine Tag objects and strings. '
%
s' was provided."
%
value
)
if
hasattr
(
models
.
Field
,
"get_prep_lookup"
):
if
hasattr
(
models
.
Field
,
"get_prep_lookup"
):
return
models
.
Field
()
.
get_prep_lookup
(
lookup_type
,
qs
)
return
models
.
Field
()
.
get_prep_lookup
(
lookup_type
,
qs
)
return
models
.
Field
()
.
get_db_prep_lookup
(
lookup_type
,
qs
)
return
models
.
Field
()
.
get_db_prep_lookup
(
lookup_type
,
qs
)
...
@@ -85,7 +85,7 @@ class TaggableManager(object):
...
@@ -85,7 +85,7 @@ class TaggableManager(object):
def
formfield
(
self
,
form_class
=
TagField
,
**
kwargs
):
def
formfield
(
self
,
form_class
=
TagField
,
**
kwargs
):
defaults
=
{
defaults
=
{
"label"
:
"Tags"
,
"label"
:
"Tags"
,
"help_text"
:
"A comma
sepe
rated list of tags."
"help_text"
:
"A comma
-sepa
rated list of tags."
}
}
defaults
.
update
(
kwargs
)
defaults
.
update
(
kwargs
)
return
form_class
(
**
kwargs
)
return
form_class
(
**
kwargs
)
...
...
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