authentication - How to use django_python3_ldap auth and django default auth at same time -


i making dajnago 1.8 application (using python3), want admin users (is_staff = true) can loggin through ldap server , admin superusers (is_superuser = true) can logged in using default django auth. using django_python3_ldap ldap loggin backend, , django admin site administaration. now, application seems allways auth users through ldap backend , don't use default authentication backend, , want if connection ldap server fails use default authentication backend. need create own admin site or can apply configuration purpose. thanks.

have set authentication backends this?

authentication_backends = (     'django.contrib.auth.backends.modelbackend',     'django_python3_ldap.auth.ldapbackend', ) 

that should try both given credentials. if succeeds on modelbackend, not attempt try ldap. goes through them sequentially until find 1 works.


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -