1 # Django settings for myslice project.
7 # ('Your Name', 'your_email@example.com'),
12 ## guess if we run on the 'prod' site (:) or on a working laptop
17 if os.path.exists("/root/myslice"):
20 ROOT=os.path.expanduser("~/git/myslice-django")
25 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
26 'NAME': os.path.join(ROOT,'myslice.sqlite3'), # Or path to database file if using sqlite3.
27 'USER': '', # Not used with sqlite3.
28 'PASSWORD': '', # Not used with sqlite3.
29 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
30 'PORT': '', # Set to empty string for default. Not used with sqlite3.
34 # Local time zone for this installation. Choices can be found here:
35 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
36 # although not all choices may be available on all operating systems.
37 # In a Windows environment this must be set to your system time zone.
38 TIME_ZONE = 'America/Chicago'
40 # Language code for this installation. All choices can be found here:
41 # http://www.i18nguy.com/unicode/language-identifiers.html
42 LANGUAGE_CODE = 'en-us'
46 # If you set this to False, Django will make some optimizations so as not
47 # to load the internationalization machinery.
50 # If you set this to False, Django will not format dates, numbers and
51 # calendars according to the current locale.
54 # If you set this to False, Django will not use timezone-aware datetimes.
57 # Absolute filesystem path to the directory that will hold user-uploaded files.
58 # Example: "/home/media/media.lawrence.com/media/"
61 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
63 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
66 # Absolute path to the directory static files should be collected to.
67 # Don't put anything in this directory yourself; store your static files
68 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
69 # Example: "/home/media/media.lawrence.com/static/"
70 STATIC_ROOT = os.path.join(ROOT,'all-static')
72 # URL prefix for static files.
73 # Example: "http://media.lawrence.com/static/"
74 STATIC_URL = '/all-static/'
76 # Additional locations of static files
78 # Put strings here, like "/home/html/static" or "C:/www/django/static".
79 # Always use forward slashes, even on Windows.
80 # Don't forget to use absolute paths, not relative paths.
83 # List of finder classes that know how to find static files in
85 STATICFILES_FINDERS = (
86 'django.contrib.staticfiles.finders.FileSystemFinder',
87 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
88 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
91 # Make this unique, and don't share it with anybody.
92 SECRET_KEY = 't%n(3h)&r^n8(+8)(sp29t^$c2#t(m3)e2!02l8w1#36tl#t27'
94 # List of callables that know how to import templates from various sources.
96 'django.template.loaders.filesystem.Loader',
97 'django.template.loaders.app_directories.Loader',
98 # 'django.template.loaders.eggs.Loader',
101 MIDDLEWARE_CLASSES = (
102 'django.middleware.common.CommonMiddleware',
103 'django.contrib.sessions.middleware.SessionMiddleware',
104 'django.middleware.csrf.CsrfViewMiddleware',
105 'django.contrib.auth.middleware.AuthenticationMiddleware',
106 'django.contrib.messages.middleware.MessageMiddleware',
107 # Uncomment the next line for simple clickjacking protection:
108 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
111 ROOT_URLCONF = 'myslice.urls'
113 # Python dotted path to the WSGI application used by Django's runserver.
114 WSGI_APPLICATION = 'myslice.wsgi.application'
117 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
118 # Always use forward slashes, even on Windows.
119 # Don't forget to use absolute paths, not relative paths.
120 os.path.join(ROOT,"templates"),
124 'django.contrib.auth',
125 'django.contrib.contenttypes',
126 'django.contrib.sessions',
127 'django.contrib.sites',
128 'django.contrib.messages',
129 'django.contrib.staticfiles',
131 # Uncomment the next line to enable the admin:
132 # 'django.contrib.admin',
133 # Uncomment the next line to enable admin documentation:
134 # 'django.contrib.admindocs',
137 # A sample logging configuration. The only tangible logging
138 # performed by this configuration is to send an email to
139 # the site admins on every HTTP 500 error when DEBUG=False.
140 # See http://docs.djangoproject.com/en/dev/topics/logging for
141 # more details on how to customize your logging configuration.
144 'disable_existing_loggers': False,
146 'require_debug_false': {
147 '()': 'django.utils.log.RequireDebugFalse'
153 'filters': ['require_debug_false'],
154 'class': 'django.utils.log.AdminEmailHandler',
159 'handlers': ['mail_admins'],
166 AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', )