You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
545 B
26 lines
545 B
4 months ago
|
from django.conf import settings
|
||
|
|
||
|
# django-crispy-forms is optional
|
||
|
try:
|
||
|
import crispy_forms
|
||
|
except ImportError:
|
||
|
crispy_forms = None
|
||
|
|
||
|
|
||
|
def is_crispy():
|
||
|
return "crispy_forms" in settings.INSTALLED_APPS and crispy_forms
|
||
|
|
||
|
|
||
|
# coreapi is optional (Note that uritemplate is a dependency of coreapi)
|
||
|
# Fixes #525 - cannot simply import from rest_framework.compat, due to
|
||
|
# import issues w/ django-guardian.
|
||
|
try:
|
||
|
import coreapi
|
||
|
except ImportError:
|
||
|
coreapi = None
|
||
|
|
||
|
try:
|
||
|
import coreschema
|
||
|
except ImportError:
|
||
|
coreschema = None
|