|
@@ -0,0 +1,166 @@
|
|
1
|
+# Django settings for laundry project.
|
|
2
|
+import os
|
|
3
|
+import secrets
|
|
4
|
+
|
|
5
|
+DEBUG = True
|
|
6
|
+TEMPLATE_DEBUG = DEBUG
|
|
7
|
+
|
|
8
|
+ADMINS = (
|
|
9
|
+ ('thallada', 'thallada@mit.edu'),
|
|
10
|
+ ('tyler', 'tyler@hallada.net'),
|
|
11
|
+)
|
|
12
|
+
|
|
13
|
+MANAGERS = ADMINS
|
|
14
|
+
|
|
15
|
+PROJECT_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
|
|
16
|
+
|
|
17
|
+DATABASES = {
|
|
18
|
+ 'default': {
|
|
19
|
+ 'ENGINE': 'django.db.backends.mysql',
|
|
20
|
+ 'NAME': secrets.DATABASE_NAME,
|
|
21
|
+ 'USER': secrets.DATABASE_USER,
|
|
22
|
+ 'PASSWORD': secrets.DATABASE_PASSWORD,
|
|
23
|
+ 'HOST': secrets.DATABASE_HOST,
|
|
24
|
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
|
|
25
|
+ }
|
|
26
|
+}
|
|
27
|
+
|
|
28
|
+# Hosts/domain names that are valid for this site; required if DEBUG is False
|
|
29
|
+# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
|
30
|
+ALLOWED_HOSTS = []
|
|
31
|
+
|
|
32
|
+# Local time zone for this installation. Choices can be found here:
|
|
33
|
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
34
|
+# although not all choices may be available on all operating systems.
|
|
35
|
+# In a Windows environment this must be set to your system time zone.
|
|
36
|
+TIME_ZONE = 'America/New_York'
|
|
37
|
+
|
|
38
|
+# Language code for this installation. All choices can be found here:
|
|
39
|
+# http://www.i18nguy.com/unicode/language-identifiers.html
|
|
40
|
+LANGUAGE_CODE = 'en-us'
|
|
41
|
+
|
|
42
|
+SITE_ID = 1
|
|
43
|
+
|
|
44
|
+# If you set this to False, Django will make some optimizations so as not
|
|
45
|
+# to load the internationalization machinery.
|
|
46
|
+USE_I18N = True
|
|
47
|
+
|
|
48
|
+# If you set this to False, Django will not format dates, numbers and
|
|
49
|
+# calendars according to the current locale.
|
|
50
|
+USE_L10N = True
|
|
51
|
+
|
|
52
|
+# If you set this to False, Django will not use timezone-aware datetimes.
|
|
53
|
+USE_TZ = True
|
|
54
|
+
|
|
55
|
+# Absolute filesystem path to the directory that will hold user-uploaded files.
|
|
56
|
+# Example: "/var/www/example.com/media/"
|
|
57
|
+MEDIA_ROOT = ''
|
|
58
|
+
|
|
59
|
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
60
|
+# trailing slash.
|
|
61
|
+# Examples: "http://example.com/media/", "http://media.example.com/"
|
|
62
|
+MEDIA_URL = ''
|
|
63
|
+
|
|
64
|
+# Absolute path to the directory static files should be collected to.
|
|
65
|
+# Don't put anything in this directory yourself; store your static files
|
|
66
|
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
|
67
|
+# Example: "/var/www/example.com/static/"
|
|
68
|
+STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
|
|
69
|
+
|
|
70
|
+# URL prefix for static files.
|
|
71
|
+# Example: "http://example.com/static/", "http://static.example.com/"
|
|
72
|
+STATIC_URL = '/static/'
|
|
73
|
+
|
|
74
|
+# Additional locations of static files
|
|
75
|
+STATICFILES_DIRS = (
|
|
76
|
+ # Put strings here, like "/home/html/static" or "C:/www/django/static".
|
|
77
|
+ # Always use forward slashes, even on Windows.
|
|
78
|
+ # Don't forget to use absolute paths, not relative paths.
|
|
79
|
+ os.path.join(PROJECT_PATH, 'laundry_app', 'static'),
|
|
80
|
+)
|
|
81
|
+
|
|
82
|
+# List of finder classes that know how to find static files in
|
|
83
|
+# various locations.
|
|
84
|
+STATICFILES_FINDERS = (
|
|
85
|
+ 'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
86
|
+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
|
87
|
+# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
|
88
|
+)
|
|
89
|
+
|
|
90
|
+# Make this unique, and don't share it with anybody.
|
|
91
|
+SECRET_KEY = secrets.SECRET_KEY
|
|
92
|
+
|
|
93
|
+# List of callables that know how to import templates from various sources.
|
|
94
|
+TEMPLATE_LOADERS = (
|
|
95
|
+ 'django.template.loaders.filesystem.Loader',
|
|
96
|
+ 'django.template.loaders.app_directories.Loader',
|
|
97
|
+# 'django.template.loaders.eggs.Loader',
|
|
98
|
+)
|
|
99
|
+
|
|
100
|
+MIDDLEWARE_CLASSES = (
|
|
101
|
+ 'django.middleware.common.CommonMiddleware',
|
|
102
|
+ 'django.contrib.sessions.middleware.SessionMiddleware',
|
|
103
|
+ 'django.middleware.csrf.CsrfViewMiddleware',
|
|
104
|
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
105
|
+ 'django.contrib.messages.middleware.MessageMiddleware',
|
|
106
|
+ # Uncomment the next line for simple clickjacking protection:
|
|
107
|
+ # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
108
|
+)
|
|
109
|
+
|
|
110
|
+ROOT_URLCONF = 'laundry.urls'
|
|
111
|
+
|
|
112
|
+# Python dotted path to the WSGI application used by Django's runserver.
|
|
113
|
+WSGI_APPLICATION = 'laundry.wsgi.application'
|
|
114
|
+
|
|
115
|
+TEMPLATE_DIRS = (
|
|
116
|
+ # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
|
117
|
+ # Always use forward slashes, even on Windows.
|
|
118
|
+ # Don't forget to use absolute paths, not relative paths.
|
|
119
|
+ os.path.join(PROJECT_PATH, 'templates'),
|
|
120
|
+)
|
|
121
|
+
|
|
122
|
+INSTALLED_APPS = (
|
|
123
|
+ 'django.contrib.auth',
|
|
124
|
+ 'django.contrib.contenttypes',
|
|
125
|
+ 'django.contrib.sessions',
|
|
126
|
+ 'django.contrib.sites',
|
|
127
|
+ 'django.contrib.messages',
|
|
128
|
+ 'django.contrib.staticfiles',
|
|
129
|
+ # Uncomment the next line to enable the admin:
|
|
130
|
+ # 'django.contrib.admin',
|
|
131
|
+ # Uncomment the next line to enable admin documentation:
|
|
132
|
+ # 'django.contrib.admindocs',
|
|
133
|
+ 'laundry_app',
|
|
134
|
+ 'south',
|
|
135
|
+)
|
|
136
|
+
|
|
137
|
+SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
|
|
138
|
+
|
|
139
|
+# A sample logging configuration. The only tangible logging
|
|
140
|
+# performed by this configuration is to send an email to
|
|
141
|
+# the site admins on every HTTP 500 error when DEBUG=False.
|
|
142
|
+# See http://docs.djangoproject.com/en/dev/topics/logging for
|
|
143
|
+# more details on how to customize your logging configuration.
|
|
144
|
+LOGGING = {
|
|
145
|
+ 'version': 1,
|
|
146
|
+ 'disable_existing_loggers': False,
|
|
147
|
+ 'filters': {
|
|
148
|
+ 'require_debug_false': {
|
|
149
|
+ '()': 'django.utils.log.RequireDebugFalse'
|
|
150
|
+ }
|
|
151
|
+ },
|
|
152
|
+ 'handlers': {
|
|
153
|
+ 'mail_admins': {
|
|
154
|
+ 'level': 'ERROR',
|
|
155
|
+ 'filters': ['require_debug_false'],
|
|
156
|
+ 'class': 'django.utils.log.AdminEmailHandler'
|
|
157
|
+ }
|
|
158
|
+ },
|
|
159
|
+ 'loggers': {
|
|
160
|
+ 'django.request': {
|
|
161
|
+ 'handlers': ['mail_admins'],
|
|
162
|
+ 'level': 'ERROR',
|
|
163
|
+ 'propagate': True,
|
|
164
|
+ },
|
|
165
|
+ }
|
|
166
|
+}
|