mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:39:49 +00:00
delay LDAPSearch import
This commit is contained in:
@@ -18,7 +18,6 @@ import ldap
|
|||||||
from common.src.env_settings import EnvironmentSettings
|
from common.src.env_settings import EnvironmentSettings
|
||||||
from common.src.helper import ta_host_parser
|
from common.src.helper import ta_host_parser
|
||||||
from corsheaders.defaults import default_headers
|
from corsheaders.defaults import default_headers
|
||||||
from django_auth_ldap.config import LDAPSearch
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -107,6 +106,8 @@ WSGI_APPLICATION = "config.wsgi.application"
|
|||||||
|
|
||||||
if bool(environ.get("TA_LDAP")):
|
if bool(environ.get("TA_LDAP")):
|
||||||
# pylint: disable=global-at-module-level
|
# pylint: disable=global-at-module-level
|
||||||
|
from django_auth_ldap.config import LDAPSearch
|
||||||
|
|
||||||
global AUTH_LDAP_SERVER_URI
|
global AUTH_LDAP_SERVER_URI
|
||||||
AUTH_LDAP_SERVER_URI = environ.get("TA_LDAP_SERVER_URI")
|
AUTH_LDAP_SERVER_URI = environ.get("TA_LDAP_SERVER_URI")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user