Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit cc2dc41

Browse files
committed
fixed errors with imports
1 parent 2ce0318 commit cc2dc41

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rest_framework_jwt/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
from six import string_types
66

7-
from django.db.models.loading import get_model
7+
try:
8+
from django.db.models.loading import get_model
9+
except ImportError:
10+
from django.apps import apps
11+
get_model = apps.get_model
812

913
from calendar import timegm
1014
from datetime import datetime

0 commit comments

Comments
 (0)