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
aca6079a
authored
Aug 07, 2013
by
Florian Apolloner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Django 1.7 support.
parent
e8642cbc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
taggit/managers.py
+4
-0
No files found.
taggit/managers.py
View file @
aca6079a
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
from
django
import
VERSION
from
django.contrib.contenttypes.generic
import
GenericRelation
from
django.contrib.contenttypes.generic
import
GenericRelation
from
django.contrib.contenttypes.models
import
ContentType
from
django.contrib.contenttypes.models
import
ContentType
from
django.db
import
models
from
django.db
import
models
...
@@ -72,7 +73,10 @@ class TaggableManager(RelatedField, Field):
...
@@ -72,7 +73,10 @@ class TaggableManager(RelatedField, Field):
return
manager
return
manager
def
contribute_to_class
(
self
,
cls
,
name
):
def
contribute_to_class
(
self
,
cls
,
name
):
if
VERSION
<
(
1
,
7
):
self
.
name
=
self
.
column
=
name
self
.
name
=
self
.
column
=
name
else
:
self
.
set_attributes_from_name
(
name
)
self
.
model
=
cls
self
.
model
=
cls
cls
.
_meta
.
add_field
(
self
)
cls
.
_meta
.
add_field
(
self
)
setattr
(
cls
,
name
,
self
)
setattr
(
cls
,
name
,
self
)
...
...
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