Skip to content

Commit b0501d1

Browse files
author
Michael Barr
committed
Attempted fix for no module named forms. Should fix the discover_runner in installed apps < 1.6.
1 parent 4281dbb commit b0501d1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

run_tests.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@
1212
from django.core.management import execute_from_command_line
1313
from django.utils import timezone
1414

15+
INSTALLED_APPS = [
16+
'django.contrib.contenttypes',
17+
'django.contrib.auth',
18+
'timezone_utils',
19+
'tests',
20+
]
21+
1522
if not settings.configured:
1623
test_runners_args = {}
1724
if VERSION < (1, 6): # pragma: no cover
25+
INSTALLED_APPS.append('discover_runner')
1826
test_runners_args = {
1927
'TEST_RUNNER': 'discover_runner.DiscoverRunner',
2028
}
@@ -25,13 +33,7 @@
2533
'NAME': ':memory:',
2634
},
2735
},
28-
INSTALLED_APPS=(
29-
'django.contrib.contenttypes',
30-
'django.contrib.auth',
31-
'discover_runner',
32-
'timezone_utils',
33-
'tests',
34-
),
36+
INSTALLED_APPS=tuple(INSTALLED_APPS),
3537
MIDDLEWARE_CLASSES = (
3638
'django.middleware.common.CommonMiddleware',
3739
'django.middleware.csrf.CsrfViewMiddleware',

timezone_utils/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from django.utils.translation import ugettext_lazy as _
2020

2121
# App
22-
import forms
22+
from timezone_utils import forms
2323

2424
__all__ = ('TimeZoneField', 'LinkedTZDateTimeField')
2525

0 commit comments

Comments
 (0)