Ticket #14961: settings.py

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