Skip to content

Commit 4a79813

Browse files
authored
[fix] Fixed failing build #268
Related to #268
1 parent 29228a4 commit 4a79813

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

rest_framework_gis/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import django
2-
31
VERSION = (0, 18, 0, 'final')
42
__version__ = VERSION # alias
53

@@ -16,5 +14,10 @@ def get_version():
1614
return version
1715

1816

19-
if django.VERSION < (3, 2):
20-
default_app_config = 'rest_framework_gis.apps.AppConfig'
17+
try:
18+
import django
19+
20+
if django.VERSION < (3, 2):
21+
default_app_config = 'rest_framework_gis.apps.AppConfig'
22+
except ImportError:
23+
pass

0 commit comments

Comments
 (0)