File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 4
4
Massimiliano Pippi
5
5
Federico Frenguelli
6
6
Stéphane Raimbault
7
- Emanuele Palazzetti
7
+ Emanuele Palazzetti
8
+
9
+ Contributors
10
+ ============
11
+
12
+ David Fischer
Original file line number Diff line number Diff line change 3
3
from django .core .urlresolvers import reverse
4
4
from django .db import models
5
5
from django .utils import timezone
6
- from django .db .models import get_model
6
+ try :
7
+ # Django's new application loading system
8
+ from django .apps import apps
9
+ get_model = apps .get_model
10
+ except ImportError :
11
+ from django .db .models import get_model
7
12
from django .utils .translation import ugettext_lazy as _
8
13
from django .utils .encoding import python_2_unicode_compatible
9
14
from django .core .exceptions import ImproperlyConfigured
Original file line number Diff line number Diff line change 20
20
import six
21
21
22
22
from django .conf import settings
23
- from django .utils import importlib
23
+ try :
24
+ # Available in Python 2.7+
25
+ import importlib
26
+ except ImportError :
27
+ from django .utils import importlib
24
28
25
29
26
30
USER_SETTINGS = getattr (settings , 'OAUTH2_PROVIDER' , None )
You can’t perform that action at this time.
0 commit comments