X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/34efbf37f568d6db6523da7dde3a134c467ed89b..b88bb747c08269f187d6073504c7dca3568112b9:/cas_provider_examples/simple/settings.py?ds=sidebyside diff --git a/cas_provider_examples/simple/settings.py b/cas_provider_examples/simple/settings.py index 9140cf6..e594559 100644 --- a/cas_provider_examples/simple/settings.py +++ b/cas_provider_examples/simple/settings.py @@ -1,7 +1,6 @@ # Django settings for xxx project. DEBUG = True -TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), @@ -9,14 +8,12 @@ ADMINS = ( MANAGERS = ADMINS +import os + DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(os.path.dirname(os.path.realpath(__file__)), 'db'), } } @@ -52,6 +49,11 @@ MEDIA_ROOT = '' # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" MEDIA_URL = '' +# Allow SHA1, because it's used in the fixture. +PASSWORD_HASHERS = [ + 'django.contrib.auth.hashers.SHA1PasswordHasher', +] + # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. @@ -85,14 +87,7 @@ STATICFILES_FINDERS = ( # Make this unique, and don't share it with anybody. SECRET_KEY = 'kv*6pmkq47crqskw%wkst!h7xnisy78zzli@rtklgm#y6o=of!' -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.Loader', -) - -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -100,16 +95,33 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', ) + + ROOT_URLCONF = 'simple.urls' import os PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) -TEMPLATE_DIRS = ( - os.path.join(PROJECT_PATH, 'templates') -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [ + os.path.join(PROJECT_PATH, 'templates'), + ], + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + } +] INSTALLED_APPS = ( + 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', @@ -117,6 +129,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'cas_provider', + 'simple', ) # A sample logging configuration. The only tangible logging @@ -141,3 +154,6 @@ LOGGING = { }, } } + + +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'