File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 66
77import django
88from django .db import models , router
9- from django .db .models import loading
9+ try :
10+ from django .apps import apps
11+ get_app = apps .get_app
12+ except (ImportError , AttributeError ):
13+ from django .db .models .loading import get_app
1014from django .db .models .fields .proxy import OrderWrt
1115from django .db .models .fields .related import RelatedField
1216from django .conf import settings
@@ -103,7 +107,7 @@ def create_history_model(self, model):
103107 elif app_module != self .module :
104108 if apps is None : # Django < 1.7
105109 # has meta options with app_label
106- app = loading . get_app (model ._meta .app_label )
110+ app = get_app (model ._meta .app_label )
107111 attrs ['__module__' ] = app .__name__ # full dotted name
108112 else :
109113 # Abuse an internal API because the app registry is loading.
You can’t perform that action at this time.
0 commit comments