mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
Skip testing Guardian on PY2
See https://github.com/django-guardian/django-guardian/issues/602
This commit is contained in:
parent
de4bcf74f7
commit
fc1c9d1770
|
@ -161,6 +161,10 @@ def is_guardian_installed():
|
||||||
"""
|
"""
|
||||||
django-guardian is optional and only imported if in INSTALLED_APPS.
|
django-guardian is optional and only imported if in INSTALLED_APPS.
|
||||||
"""
|
"""
|
||||||
|
if six.PY2:
|
||||||
|
# Guardian 1.5.0, for Django 2.2 is NOT compatible with Python 2.7.
|
||||||
|
# Remove when dropping PY2.
|
||||||
|
return False
|
||||||
return 'guardian' in settings.INSTALLED_APPS
|
return 'guardian' in settings.INSTALLED_APPS
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user