mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-13 05:06:53 +03:00
Do not access settings on compat import
This commit is contained in:
parent
7905e9f9f4
commit
39ec564ae9
|
@ -94,7 +94,6 @@ else:
|
||||||
# Django-guardian is optional. Import only if guardian is in INSTALLED_APPS
|
# Django-guardian is optional. Import only if guardian is in INSTALLED_APPS
|
||||||
# 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
|
||||||
if 'guardian' in settings.INSTALLED_APPS:
|
|
||||||
try:
|
try:
|
||||||
import guardian
|
import guardian
|
||||||
import guardian.shortcuts # Fixes #1624
|
import guardian.shortcuts # Fixes #1624
|
||||||
|
|
Loading…
Reference in New Issue
Block a user