Commit fc5fcc2e authored by David Seaward's avatar David Seaward

add settings and templates for django-auth-ldap, django-registration (with...

add settings and templates for django-auth-ldap, django-registration (with django-registration-defaults) and Jinja2
parent f5f8f62b
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
......@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'ldapregister',
]
MIDDLEWARE = [
......@@ -65,6 +66,16 @@ TEMPLATES = [
],
},
},
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'extensions': [
'jdj_tags.extensions.DjangoCompat',
],
},
},
]
WSGI_APPLICATION = 'purist_account.wsgi.application'
......
......@@ -16,3 +16,19 @@ DEBUG = False
# Required if DEBUG is False
ALLOWED_HOSTS = []
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
# 'django.contrib.auth.backends.ModelBackend',
)
AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
AUTH_LDAP_START_TLS = True
AUTH_LDAP_BIND_DN = "cn=application,dc=example,dc=com"
AUTH_LDAP_BIND_PASSWORD = "password"
AUTH_LDAP_USER_SEARCH = LDAPSearch("dc=example,dc=com", ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
# INSTALLED_APPS = ["registration_defaults", ] + INSTALLED_APPS
REGISTRATION_OPEN = True
......@@ -13,9 +13,10 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/', include('registration.backends.simple.urls')),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment