Do not access settings on compat import

This commit is contained in:
Tom Christie 2015-09-03 14:22:13 +01:00
parent 7905e9f9f4
commit 39ec564ae9

View File

@ -94,7 +94,6 @@ else:
# Django-guardian is optional. Import only if guardian is in INSTALLED_APPS
# Fixes (#1712). We keep the try/except for the test suite.
guardian = None
if 'guardian' in settings.INSTALLED_APPS:
try:
import guardian
import guardian.shortcuts # Fixes #1624