Skip to content

Instantly share code, notes, and snippets.

@ist0ne
ist0ne / settings_ldap.py
Created June 26, 2018 07:46 — forked from SEJeff/settings_ldap.py
Example django_auth_ldap configuration
############################## django-auth-ldap ##############################
import ldap
from django_auth_ldap.config import LDAPSearch, PosixGroupType
# django-auth-ldap configuration starts here
AUTH_LDAP_SERVER_URI = "ldap://ldap.els03.loc ldap://ldap.zbw03.loc ldap://ldap.cvg03.loc"
#AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=People,o=loc"
# JW is in ou=Admin,o=loc so we search over o=loc to find him
AUTH_LDAP_USER_SEARCH = LDAPSearch("o=loc",
@ist0ne
ist0ne / gist:624ad85bec705b52beb8a1190b1ab5e3
Created June 23, 2016 04:54 — forked from lucifr/gist:1208100
Sublime Text 2 - 实用快捷键 (Mac OS X)