mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 05:24:00 +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.
|
||||
guardian = None
|
||||
try:
|
||||
if 'guardian' in settings.INSTALLED_APPS:
|
||||
import guardian
|
||||
import guardian.shortcuts # Fixes #1624
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in New Issue
Block a user