|
11 | 11 |
|
12 | 12 | DATABASES = {
|
13 | 13 | 'default': {
|
14 |
| - 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
| 14 | + 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
15 | 15 | 'NAME': '', # Or path to database file if using sqlite3.
|
16 | 16 | 'USER': '', # Not used with sqlite3.
|
17 | 17 | 'PASSWORD': '', # Not used with sqlite3.
|
|
20 | 20 | }
|
21 | 21 | }
|
22 | 22 |
|
23 |
| -# Hosts/domain names that are valid for this site; required if DEBUG is False |
24 |
| -# See https://docs.djangoproject.com/en/1.3/ref/settings/#allowed-hosts |
25 |
| -ALLOWED_HOSTS = [] |
26 |
| - |
27 | 23 | # Local time zone for this installation. Choices can be found here:
|
28 | 24 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
29 | 25 | # although not all choices may be available on all operating systems.
|
|
44 | 40 | USE_I18N = True
|
45 | 41 |
|
46 | 42 | # If you set this to False, Django will not format dates, numbers and
|
47 |
| -# calendars according to the current locale |
| 43 | +# calendars according to the current locale. |
48 | 44 | USE_L10N = True
|
49 | 45 |
|
| 46 | +# If you set this to False, Django will not use timezone-aware datetimes. |
| 47 | +USE_TZ = True |
| 48 | + |
50 | 49 | # Absolute filesystem path to the directory that will hold user-uploaded files.
|
51 | 50 | # Example: "/home/media/media.lawrence.com/media/"
|
52 | 51 | MEDIA_ROOT = ''
|
|
66 | 65 | # Example: "http://media.lawrence.com/static/"
|
67 | 66 | STATIC_URL = '/static/'
|
68 | 67 |
|
69 |
| -# URL prefix for admin static files -- CSS, JavaScript and images. |
70 |
| -# Make sure to use a trailing slash. |
71 |
| -# Examples: "http://foo.com/static/admin/", "/static/admin/". |
72 |
| -ADMIN_MEDIA_PREFIX = '/static/admin/' |
73 |
| - |
74 | 68 | # Additional locations of static files
|
75 | 69 | STATICFILES_DIRS = (
|
76 | 70 | # Put strings here, like "/home/html/static" or "C:/www/django/static".
|
|
102 | 96 | 'django.middleware.csrf.CsrfViewMiddleware',
|
103 | 97 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
104 | 98 | 'django.contrib.messages.middleware.MessageMiddleware',
|
| 99 | + # Uncomment the next line for simple clickjacking protection: |
| 100 | + # 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
105 | 101 | )
|
106 | 102 |
|
107 | 103 | ROOT_URLCONF = 'project.urls'
|
108 | 104 |
|
| 105 | +# Python dotted path to the WSGI application used by Django's runserver. |
| 106 | +WSGI_APPLICATION = 'project.wsgi.application' |
| 107 | + |
109 | 108 | TEMPLATE_DIRS = (
|
110 | 109 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
111 | 110 | # Always use forward slashes, even on Windows.
|
|
127 | 126 |
|
128 | 127 | # A sample logging configuration. The only tangible logging
|
129 | 128 | # performed by this configuration is to send an email to
|
130 |
| -# the site admins on every HTTP 500 error. |
| 129 | +# the site admins on every HTTP 500 error when DEBUG=False. |
131 | 130 | # See http://docs.djangoproject.com/en/dev/topics/logging for
|
132 | 131 | # more details on how to customize your logging configuration.
|
133 | 132 | LOGGING = {
|
134 | 133 | 'version': 1,
|
135 | 134 | 'disable_existing_loggers': False,
|
| 135 | + 'filters': { |
| 136 | + 'require_debug_false': { |
| 137 | + '()': 'django.utils.log.RequireDebugFalse' |
| 138 | + } |
| 139 | + }, |
136 | 140 | 'handlers': {
|
137 | 141 | 'mail_admins': {
|
138 | 142 | 'level': 'ERROR',
|
| 143 | + 'filters': ['require_debug_false'], |
139 | 144 | 'class': 'django.utils.log.AdminEmailHandler'
|
140 | 145 | }
|
141 | 146 | },
|
|
0 commit comments