Move unit tests out of the app.
[django-cas-provider.git] / cas_provider_examples / simple / settings.py
1 # Django settings for xxx project.
2
3 DEBUG = True
4 TEMPLATE_DEBUG = DEBUG
5
6 ADMINS = (
7     # ('Your Name', 'your_email@example.com'),
8 )
9
10 MANAGERS = ADMINS
11
12 import os
13
14 DATABASES = {
15     'default': {
16         'ENGINE': 'django.db.backends.sqlite3',
17         'NAME': os.path.join(os.path.realpath(__file__), 'db'),
18     }
19 }
20
21 # Local time zone for this installation. Choices can be found here:
22 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
23 # although not all choices may be available on all operating systems.
24 # On Unix systems, a value of None will cause Django to use the same
25 # timezone as the operating system.
26 # If running in a Windows environment this must be set to the same as your
27 # system time zone.
28 TIME_ZONE = 'America/Chicago'
29
30 # Language code for this installation. All choices can be found here:
31 # http://www.i18nguy.com/unicode/language-identifiers.html
32 LANGUAGE_CODE = 'en-us'
33
34 SITE_ID = 1
35
36 # If you set this to False, Django will make some optimizations so as not
37 # to load the internationalization machinery.
38 USE_I18N = True
39
40 # If you set this to False, Django will not format dates, numbers and
41 # calendars according to the current locale
42 USE_L10N = True
43
44 # Absolute filesystem path to the directory that will hold user-uploaded files.
45 # Example: "/home/media/media.lawrence.com/media/"
46 MEDIA_ROOT = ''
47
48 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
49 # trailing slash.
50 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
51 MEDIA_URL = ''
52
53 # Absolute path to the directory static files should be collected to.
54 # Don't put anything in this directory yourself; store your static files
55 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
56 # Example: "/home/media/media.lawrence.com/static/"
57 STATIC_ROOT = ''
58
59 # URL prefix for static files.
60 # Example: "http://media.lawrence.com/static/"
61 STATIC_URL = '/static/'
62
63 # URL prefix for admin static files -- CSS, JavaScript and images.
64 # Make sure to use a trailing slash.
65 # Examples: "http://foo.com/static/admin/", "/static/admin/".
66 ADMIN_MEDIA_PREFIX = '/static/admin/'
67
68 # Additional locations of static files
69 STATICFILES_DIRS = (
70     # Put strings here, like "/home/html/static" or "C:/www/django/static".
71     # Always use forward slashes, even on Windows.
72     # Don't forget to use absolute paths, not relative paths.
73 )
74
75 # List of finder classes that know how to find static files in
76 # various locations.
77 STATICFILES_FINDERS = (
78     'django.contrib.staticfiles.finders.FileSystemFinder',
79     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
80 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
81 )
82
83 # Make this unique, and don't share it with anybody.
84 SECRET_KEY = 'kv*6pmkq47crqskw%wkst!h7xnisy78zzli@rtklgm#y6o=of!'
85
86 # List of callables that know how to import templates from various sources.
87 TEMPLATE_LOADERS = (
88     'django.template.loaders.filesystem.Loader',
89     'django.template.loaders.app_directories.Loader',
90 #     'django.template.loaders.eggs.Loader',
91 )
92
93 MIDDLEWARE_CLASSES = (
94     'django.middleware.common.CommonMiddleware',
95     'django.contrib.sessions.middleware.SessionMiddleware',
96     'django.middleware.csrf.CsrfViewMiddleware',
97     'django.contrib.auth.middleware.AuthenticationMiddleware',
98     'django.contrib.messages.middleware.MessageMiddleware',
99 )
100
101 ROOT_URLCONF = 'simple.urls'
102
103 import os
104 PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
105
106 TEMPLATE_DIRS = (
107      os.path.join(PROJECT_PATH, 'templates'),
108 )
109
110 INSTALLED_APPS = (
111     'django.contrib.admin',
112     'django.contrib.auth',
113     'django.contrib.contenttypes',
114     'django.contrib.sessions',
115     'django.contrib.sites',
116     'django.contrib.messages',
117     'django.contrib.staticfiles',
118     'cas_provider',
119     'simple',
120 )
121
122 # A sample logging configuration. The only tangible logging
123 # performed by this configuration is to send an email to
124 # the site admins on every HTTP 500 error.
125 # See http://docs.djangoproject.com/en/dev/topics/logging for
126 # more details on how to customize your logging configuration.
127 LOGGING = {
128     'version': 1,
129     'disable_existing_loggers': False,
130     'handlers': {
131         'mail_admins': {
132             'level': 'ERROR',
133             'class': 'django.utils.log.AdminEmailHandler'
134         }
135     },
136     'loggers': {
137         'django.request': {
138             'handlers': ['mail_admins'],
139             'level': 'ERROR',
140             'propagate': True,
141         },
142     }
143 }