Closed loimu closed 8 years ago
Can you do a try
/ except
here so that we continue to support old versions of Django?
Hi there! Will this get merged anytime soon? It addresses a problem I'm encountering.
The try/except should probably be the other way around - first try with the new API and fall back to the old django.db.models.loading
, i.e..
try:
from django.apps import apps as cache
except ImportError:
from django.db.models.loading import cache
Why is this PR closed? The proposed change is not yet merged.
@pelme Because it's better to create a new one. Too many changesets for such a minor change. The actual code:
try:
from django.apps import apps as cache # django >= 1.7
except ImportError:
from django.db.models.loading import cache # django < 1.7
This lib seems broken due to this change not being merged.
Lib is really broken, as @nicksergeant said. I get ModuleNotFoundError: No module named 'django.db.models.loading'
error on from django.db.models.loading import cache
django.db.models.loading module was removed since 1.9 https://docs.djangoproject.com/en/1.9/internals/deprecation/