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