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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
549b33f1
authored
Jan 09, 2015
by
Luke Pomfrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add get_internal_type to TaggableManager for #285
parent
ed8af524
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
taggit/managers.py
+3
-0
tests/tests.py
+5
-0
No files found.
taggit/managers.py
View file @
549b33f1
...
@@ -298,6 +298,9 @@ class TaggableManager(RelatedField, Field):
...
@@ -298,6 +298,9 @@ class TaggableManager(RelatedField, Field):
else
:
else
:
self
.
post_through_setup
(
cls
)
self
.
post_through_setup
(
cls
)
def
get_internal_type
(
self
):
return
'ManyToManyField'
def
__lt__
(
self
,
other
):
def
__lt__
(
self
,
other
):
"""
"""
Required contribute_to_class as Django uses bisect
Required contribute_to_class as Django uses bisect
...
...
tests/tests.py
View file @
549b33f1
...
@@ -368,6 +368,11 @@ class TaggableManagerTestCase(BaseTaggingTestCase):
...
@@ -368,6 +368,11 @@ class TaggableManagerTestCase(BaseTaggingTestCase):
'apple'
:
set
([
'1'
,
'2'
])
'apple'
:
set
([
'1'
,
'2'
])
})
})
def
test_internal_type_is_manytomany
(
self
):
self
.
assertEqual
(
TaggableManager
()
.
get_internal_type
(),
'ManyToManyField'
)
class
TaggableManagerDirectTestCase
(
TaggableManagerTestCase
):
class
TaggableManagerDirectTestCase
(
TaggableManagerTestCase
):
food_model
=
DirectFood
food_model
=
DirectFood
pet_model
=
DirectPet
pet_model
=
DirectPet
...
...
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