mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Remove use of django.db.models.loading
This commit is contained in:
parent
a8e49a039d
commit
a28da2e485
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ def import_objects(options, style):
|
|||
# XXX: (Temporary) workaround for ticket #1796: force early loading of all
|
||||
# models from installed apps. (this is fixed by now, but leaving it here
|
||||
# for people using 0.96 or older trunk (pre [5919]) versions.
|
||||
from django.db.models.loading import get_models, get_apps
|
||||
from django.apps import apps
|
||||
loaded_models = get_models() # NOQA
|
||||
|
||||
from django.conf import settings
|
||||
|
@ -21,8 +21,8 @@ def import_objects(options, style):
|
|||
|
||||
model_aliases = getattr(settings, 'SHELL_PLUS_MODEL_ALIASES', {})
|
||||
|
||||
for app_mod in get_apps():
|
||||
app_models = get_models(app_mod)
|
||||
for app_mod in apps.app_configs.items():
|
||||
app_models = apps.get_models(app_mod)
|
||||
if not app_models:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue