Skip to content
Snippets Groups Projects
Commit fbfed060 authored by Christian Dresen's avatar Christian Dresen
Browse files

Refactored in different Apps

parent 86fda74a
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -28,7 +28,7 @@ SECRET_KEY = '4m4c(_$ubwued9p-insp!950g&r0yu851bp287$2a3ydj^y=0=' ...@@ -28,7 +28,7 @@ SECRET_KEY = '4m4c(_$ubwued9p-insp!950g&r0yu851bp287$2a3ydj^y=0='
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
MEDIA_ROOT = 'media/' MEDIA_ROOT = 'templates/media/'
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
ALLOWED_HOSTS = [] ALLOWED_HOSTS = []
...@@ -44,7 +44,8 @@ INSTALLED_APPS = ( ...@@ -44,7 +44,8 @@ INSTALLED_APPS = (
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'bootstrapform', 'bootstrapform',
'warpauthWeb', 'warpauth',
'warpfood',
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
...@@ -58,12 +59,12 @@ MIDDLEWARE_CLASSES = ( ...@@ -58,12 +59,12 @@ MIDDLEWARE_CLASSES = (
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
) )
ROOT_URLCONF = 'warpauth.urls' ROOT_URLCONF = 'warpzone.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': ['templates'],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [
...@@ -76,7 +77,7 @@ TEMPLATES = [ ...@@ -76,7 +77,7 @@ TEMPLATES = [
}, },
] ]
WSGI_APPLICATION = 'warpauth.wsgi.application' WSGI_APPLICATION = 'warpzone.wsgi.application'
# Database # Database
...@@ -85,14 +86,14 @@ WSGI_APPLICATION = 'warpauth.wsgi.application' ...@@ -85,14 +86,14 @@ WSGI_APPLICATION = 'warpauth.wsgi.application'
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'warpauth.db' 'NAME': 'warpzone.db'
}, },
'ldap': { 'ldap': {
'ENGINE': 'ldapdb.backends.ldap', 'ENGINE': 'ldapdb.backends.ldap',
'NAME': 'ldap://s1.dyhost.de/', 'NAME': 'ldap://s1.dyhost.de/',
'USER': 'cn=admin,dc=warpzone,dc=ms', 'USER': 'cn=admin,dc=warpzone,dc=ms',
'PASSWORD': '12345', 'PASSWORD': '12345',
} }
} }
DATABASE_ROUTERS = ['ldapdb.router.Router'] DATABASE_ROUTERS = ['ldapdb.router.Router']
# Internationalization # Internationalization
...@@ -125,15 +126,15 @@ AUTH_LDAP_BIND_PASSWORD = "12345" ...@@ -125,15 +126,15 @@ AUTH_LDAP_BIND_PASSWORD = "12345"
AUTH_LDAP_SERVER_URI = "ldap://s1.dyhost.de" AUTH_LDAP_SERVER_URI = "ldap://s1.dyhost.de"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=User,dc=warpzone,dc=ms", AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=User,dc=warpzone,dc=ms",
ldap.SCOPE_SUBTREE, "(uid=%(user)s)") ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
AUTH_LDAP_USER_ATTR_MAP = {"first_name": "givenName", "last_name": "sn","email":"description"} AUTH_LDAP_USER_ATTR_MAP = {"first_name": "givenName", "last_name": "sn", "email": "description"}
AUTH_LDAP_PROFILE_ATTR_MAP = {"home_directory": "homeDirectory"} AUTH_LDAP_PROFILE_ATTR_MAP = {"home_directory": "homeDirectory"}
AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=Groups,dc=warpzone,dc=ms", AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=Groups,dc=warpzone,dc=ms",
ldap.SCOPE_SUBTREE, "(objectClass=posixGroup)" ldap.SCOPE_SUBTREE, "(objectClass=posixGroup)"
) )
AUTH_LDAP_GROUP_TYPE = PosixGroupType() AUTH_LDAP_GROUP_TYPE = PosixGroupType()
......
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, }),
url(r'^', include('warpauth.urls')),
url(r'^', include('warpfood.urls')),
]
...@@ -11,6 +11,6 @@ import os ...@@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "warpauth.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "warpzone.settings")
application = get_wsgi_application() application = get_wsgi_application()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment