mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Switched from using django.db.models.loading.get_model to using django.apps.apps.get_model
This commit is contained in:
parent
02d6b984ca
commit
337cca5813
1 changed files with 2 additions and 2 deletions
|
|
@ -119,10 +119,10 @@ def _process_registry(registry, call_func):
|
|||
Given a dictionary, and a registration function, process the registry
|
||||
"""
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.db.models.loading import get_model
|
||||
from django.apps import apps
|
||||
|
||||
for key, value in list(registry.items()):
|
||||
model = get_model(*key.split('.'))
|
||||
model = apps.get_model(*key.split('.'))
|
||||
if model is None:
|
||||
raise ImproperlyConfigured(_('%(key)s is not a model') % {'key': key})
|
||||
if isinstance(value, (tuple, list)):
|
||||
|
|
|
|||
Loading…
Reference in a new issue