root/ossiedev/branches/jsnyder/trunk/tools/cornetApps/settings.py @ 11070

Revision 11070, 5.7 KB (checked in by edent, 3 years ago)

add more documentation

Line 
1
2
3# Django settings for running cornetApps project *locally*
4
5DEBUG = True
6TEMPLATE_DEBUG = DEBUG
7
8ADMINS = (
9    # ('Your Name', 'your_email@example.com'),
10)
11
12MANAGERS = ADMINS
13
14DATABASES = {
15    'default': {
16        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
17        #'NAME': 'cornetApps.db',                      # Or path to database file if using sqlite3.
18            'NAME': 'cornetApps.db',  #webserver
19        'USER': '',                      # Not used with sqlite3.
20        'PASSWORD': '',                  # Not used with sqlite3.
21        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
22        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
23    }
24}
25
26# Local time zone for this installation. Choices can be found here:
27# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
28# although not all choices may be available on all operating systems.
29# On Unix systems, a value of None will cause Django to use the same
30# timezone as the operating system.
31# If running in a Windows environment this must be set to the same as your
32# system time zone.
33TIME_ZONE = 'America/Chicago'
34
35# Language code for this installation. All choices can be found here:
36# http://www.i18nguy.com/unicode/language-identifiers.html
37LANGUAGE_CODE = 'en-us'
38
39SITE_ID = 1
40
41# If you set this to False, Django will make some optimizations so as not
42# to load the internationalization machinery.
43USE_I18N = True
44
45# If you set this to False, Django will not format dates, numbers and
46# calendars according to the current locale
47USE_L10N = True
48
49# Absolute filesystem path to the directory that will hold user-uploaded files.
50# Example: "/home/media/media.lawrence.com/media/"
51MEDIA_ROOT = ''
52
53# URL that handles the media served from MEDIA_ROOT. Make sure to use a
54# trailing slash.
55# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
56MEDIA_URL = 'http://localhost:8000/'
57
58# Absolute path to the directory static files should be collected to.
59# Don't put anything in this directory yourself; store your static files
60# in apps' "static/" subdirectories and in STATICFILES_DIRS.
61# Example: "/home/media/media.lawrence.com/static/"
62
63#STATIC_ROOT = '/home/ossie/workspace/cornetApps/static/'
64STATIC_ROOT = 'static/'   #non-root directory for webserver
65
66# URL prefix for static files.
67# Example: "http://media.lawrence.com/static/"
68#STATIC_URL = 'http://cornet.wireless.vt.edu/~webdemo/django/static/' #webserver
69STATIC_URL = '/static/'
70
71#Login redirect url that directs user to next page after logging in
72LOGIN_REDIRECT_URL = '/ossie'
73
74# URL prefix for admin static files -- CSS, JavaScript and images.
75# Make sure to use a trailing slash.
76# Examples: "http://foo.com/static/admin/", "/static/admin/".
77ADMIN_MEDIA_PREFIX = '/static/admin/'
78
79# Additional locations of static files
80STATICFILES_DIRS = (
81    # Put strings here, like "/home/html/static" or "C:/www/django/static".
82    # Always use forward slashes, even on Windows.
83    # Don't forget to use absolute paths, not relative paths.
84        '/home/ossie/workspace/cornetApps/HtmlPages/static/',
85    '/home/ossie/workspace/cornetApps/DomainMan/static/',
86        #'/home/webdemo/cornetApps/HtmlPages/static/',  #webserver
87        #'/home/webdemo/cornetApps/WebDemo/static/',
88)
89
90# List of finder classes that know how to find static files in
91# various locations.
92STATICFILES_FINDERS = (
93    'django.contrib.staticfiles.finders.FileSystemFinder',
94    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
95    #'django.contrib.staticfiles.finders.DefaultStorageFinder',
96)
97
98# Make this unique, and don't share it with anybody.
99SECRET_KEY = 'xxnv0%@di9(x1h&h(2^z90g1q3zghp(0)-x=!!6xx)xt*y@902'
100
101# List of callables that know how to import templates from various sources.
102TEMPLATE_LOADERS = (
103    'django.template.loaders.filesystem.Loader',
104    'django.template.loaders.app_directories.Loader',
105#     'django.template.loaders.eggs.Loader',
106)
107
108MIDDLEWARE_CLASSES = (
109    'django.middleware.common.CommonMiddleware',
110    'django.contrib.sessions.middleware.SessionMiddleware',
111    'django.middleware.csrf.CsrfViewMiddleware',
112    'django.contrib.auth.middleware.AuthenticationMiddleware',
113    'django.contrib.messages.middleware.MessageMiddleware',
114)
115
116ROOT_URLCONF = 'cornetApps.urls'
117#ROOT_URLCONF = 'urls'
118
119TEMPLATE_DIRS = (
120        "templates",
121        '/home/webdemo/cornetApps/templates', #webserver
122        'templates/HtmlPages',
123        'templates/WebDash',
124        'templates/DomainMan',
125    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
126    # Always use forward slashes, even on Windows.
127    # Don't forget to use absolute paths, not relative paths.
128)
129
130INSTALLED_APPS = (
131    'django.contrib.auth',
132    'django.contrib.contenttypes',
133    'django.contrib.sessions',
134    'django.contrib.sites',
135    'django.contrib.messages',
136    'django.contrib.staticfiles',
137    'HtmlPages',
138    'NodeApp',
139    'DomainMan',
140    #'WebDash',
141    # Uncomment the next line to enable the admin:
142    # 'django.contrib.admin',
143    # Uncomment the next line to enable admin documentation:
144    # 'django.contrib.admindocs',
145)
146
147# A sample logging configuration. The only tangible logging
148# performed by this configuration is to send an email to
149# the site admins on every HTTP 500 error.
150# See http://docs.djangoproject.com/en/dev/topics/logging for
151# more details on how to customize your logging configuration.
152LOGGING = {
153    'version': 1,
154    'disable_existing_loggers': False,
155    'handlers': {
156        'mail_admins': {
157            'level': 'ERROR',
158            'class': 'django.utils.log.AdminEmailHandler'
159        }
160    },
161    'loggers': {
162        'django.request': {
163            'handlers': ['mail_admins'],
164            'level': 'ERROR',
165            'propagate': True,
166        },
167    }
168}
Note: See TracBrowser for help on using the browser.