Reputation: 97
I'm very new to Django and LDAP ... any help is is appreciated.
So i'm trying to setup and ldaps in Django. I'm trying to follow this (http://packages.python.org/django-auth-ldap/) instruction, but i have few questions ...
If i get the solutions to these i maybe able to figure out the rest ...
Thanks a lot for looking into this.
Upvotes: 2
Views: 2566
Reputation: 3877
AUTHENTICATION_BACKENDS should be located in your settings.py. This is where almost all configuration is done.
For AUTH_LDAP_SERVER_URI, I think you need to add this as a global variable to your settings.py.
You may also take a quick look at the example configuration on the page you referred to.
EDIT
You are right, those variables are not present in the initial settings.py
. You need to add the following to your settings.py:
# Keep ModelBackend around for per-user permissions and maybe a local
# superuser.
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
)
AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com" # replace by the real URI
Upvotes: 4