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
f478e34f
authored
Apr 08, 2014
by
Florian Apolloner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #222 from treyhunner/south-error-on-import
South error on import
parents
8f055c05
edb1753f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
3 deletions
+34
-3
taggit/migrations/__init__.py
+21
-0
tests/tests.py
+13
-3
No files found.
taggit/migrations/__init__.py
View file @
f478e34f
"""
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""
SOUTH_ERROR_MESSAGE
=
"""
\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'taggit': 'taggit.south_migrations',
}
"""
# Ensure the user is not using Django 1.6 or below with South
try
:
from
django.db
import
migrations
# noqa
except
ImportError
:
from
django.core.exceptions
import
ImproperlyConfigured
raise
ImproperlyConfigured
(
SOUTH_ERROR_MESSAGE
)
tests/tests.py
View file @
f478e34f
...
@@ -2,13 +2,13 @@ from __future__ import unicode_literals, absolute_import
...
@@ -2,13 +2,13 @@ from __future__ import unicode_literals, absolute_import
from
unittest
import
TestCase
as
UnitTestCase
from
unittest
import
TestCase
as
UnitTestCase
try
:
try
:
from
unittest
import
skipIf
from
unittest
import
skipIf
,
skipUnless
except
:
except
:
from
django.utils.unittest
import
skipIf
from
django.utils.unittest
import
skipIf
,
skipUnless
import
django
import
django
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ImproperlyConfigured
,
ValidationError
from
django.core
import
serializers
from
django.core
import
serializers
from
django.db
import
connection
from
django.db
import
connection
from
django.test
import
TestCase
,
TransactionTestCase
from
django.test
import
TestCase
,
TransactionTestCase
...
@@ -560,3 +560,13 @@ class DeconstructTestCase(UnitTestCase):
...
@@ -560,3 +560,13 @@ class DeconstructTestCase(UnitTestCase):
name
,
path
,
args
,
kwargs
=
instance
.
deconstruct
()
name
,
path
,
args
,
kwargs
=
instance
.
deconstruct
()
new_instance
=
TaggableManager
(
*
args
,
**
kwargs
)
new_instance
=
TaggableManager
(
*
args
,
**
kwargs
)
self
.
assertEqual
(
instance
.
rel
.
through
,
new_instance
.
rel
.
through
)
self
.
assertEqual
(
instance
.
rel
.
through
,
new_instance
.
rel
.
through
)
@skipUnless
(
django
.
VERSION
<
(
1
,
7
),
"test only applies to 1.6 and below"
)
class
SouthSupportTests
(
TestCase
):
def
test_import_migrations_module
(
self
):
try
:
from
taggit.migrations
import
__doc__
# noqa
except
ImproperlyConfigured
as
e
:
exception
=
e
self
.
assertIn
(
"SOUTH_MIGRATION_MODULES"
,
exception
.
args
[
0
])
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