Commit fa1cfae9 by Xavier Ordoquy

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

Update compat.py
parents 85cd717e 431ac451
...@@ -81,8 +81,9 @@ except ImportError: ...@@ -81,8 +81,9 @@ 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:
import guardian if 'guardian' in settings.INSTALLED_APPS:
import guardian.shortcuts # Fixes #1624 import guardian
import guardian.shortcuts # Fixes #1624
except ImportError: except ImportError:
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment