mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-02 06:24:05 +03:00
Merge pull request #3485 from dulmandakh/dulmandakh-guardian-check-installed-apps
Update compat.py
This commit is contained in:
commit
fa1cfae991
|
@ -81,6 +81,7 @@ except ImportError:
|
||||||
# Fixes (#1712). We keep the try/except for the test suite.
|
# Fixes (#1712). We keep the try/except for the test suite.
|
||||||
guardian = None
|
guardian = None
|
||||||
try:
|
try:
|
||||||
|
if 'guardian' in settings.INSTALLED_APPS:
|
||||||
import guardian
|
import guardian
|
||||||
import guardian.shortcuts # Fixes #1624
|
import guardian.shortcuts # Fixes #1624
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user