We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7827c3 commit fbd23bfCopy full SHA for fbd23bf
simple_history/management/commands/populate_history.py
@@ -1,7 +1,10 @@
1
from optparse import make_option
2
from django.core.management.base import BaseCommand, CommandError
3
-from django.db.models.loading import get_model
4
-
+try:
+ from django.apps import apps
5
+ get_model = apps.get_model
6
+except (ImportError, AttributeError): # django 1.6 compatibility
7
+ from django.db.models.loading import get_model
8
from ... import models
9
from . import _populate_utils as utils
10
0 commit comments