Merge pull request #3485 from dulmandakh/dulmandakh-guardian-check-installed-apps

Update compat.py
This commit is contained in:
Xavier Ordoquy 2015-10-09 08:13:42 +02:00
commit fa1cfae991

View File

@ -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: