1 from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
3 # Django settings for planetstack project.
4 from config import Config
11 # ('Your Name', 'your_email@example.com'),
18 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
19 'NAME': config.db_name, # Or path to database file if using sqlite3.
20 # The following settings are not used with sqlite3:
21 'USER': config.db_user,
22 'PASSWORD': config.db_password,
23 'HOST': config.db_host, # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
24 'PORT': '', # Set to empty string for default.
28 AUTH_USER_MODEL = 'core.User'
31 # Hosts/domain names that are valid for this site; required if DEBUG is False
32 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
35 # Local time zone for this installation. Choices can be found here:
36 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
37 # although not all choices may be available on all operating systems.
38 # In a Windows environment this must be set to your system time zone.
39 TIME_ZONE = 'America/New_York'
41 # Language code for this installation. All choices can be found here:
42 # http://www.i18nguy.com/unicode/language-identifiers.html
43 LANGUAGE_CODE = 'en-us'
47 # If you set this to False, Django will make some optimizations so as not
48 # to load the internationalization machinery.
51 # If you set this to False, Django will not format dates, numbers and
52 # calendars according to the current locale.
55 # If you set this to False, Django will not use timezone-aware datetimes.
58 # Absolute filesystem path to the directory that will hold user-uploaded files.
59 # Example: "/var/www/example.com/media/"
62 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
64 # Examples: "http://example.com/media/", "http://media.example.com/"
67 # Absolute path to the directory static files should be collected to.
68 # Don't put anything in this directory yourself; store your static files
69 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
70 # Example: "/var/www/example.com/static/"
73 # URL prefix for static files.
74 # Example: "http://example.com/static/", "http://static.example.com/"
75 STATIC_URL = '/static/'
77 # Additional locations of static files
78 STATICFILES_DIRS = ( "/opt/planetstack/core/static/",
79 # Put strings here, like "/home/html/static" or "C:/www/django/static".
80 # Always use forward slashes, even on Windows.
81 # Don't forget to use absolute paths, not relative paths.
84 # List of finder classes that know how to find static files in
86 STATICFILES_FINDERS = (
87 'django.contrib.staticfiles.finders.FileSystemFinder',
88 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
89 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
92 # Make this unique, and don't share it with anybody.
93 SECRET_KEY = 'i0=a)c7_#2)5m%k_fu#%53xap$tlqc+#&z5as+bl7&)(@be_f9'
95 # List of callables that know how to import templates from various sources.
97 'django.template.loaders.filesystem.Loader',
98 'django.template.loaders.app_directories.Loader',
99 # 'django.template.loaders.eggs.Loader',
102 MIDDLEWARE_CLASSES = (
103 'django.middleware.common.CommonMiddleware',
104 'django.contrib.sessions.middleware.SessionMiddleware',
105 'django.middleware.csrf.CsrfViewMiddleware',
106 'django.contrib.auth.middleware.AuthenticationMiddleware',
107 'django.contrib.messages.middleware.MessageMiddleware',
108 # Uncomment the next line for simple clickjacking protection:
109 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
112 ROOT_URLCONF = 'planetstack.urls'
114 # Python dotted path to the WSGI application used by Django's runserver.
115 WSGI_APPLICATION = 'planetstack.wsgi.application'
118 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
119 # Always use forward slashes, even on Windows.
120 # Don't forget to use absolute paths, not relative paths.
121 "/opt/planetstack/templates"
125 'django.contrib.auth',
126 'django.contrib.contenttypes',
127 'django.contrib.sessions',
128 # 'django.contrib.sites',
129 'django.contrib.messages',
130 'django.contrib.staticfiles',
131 # Uncomment the next line to enable the admin:
133 'django.contrib.admin',
134 # Uncomment the next line to enable admin documentation:
135 'django.contrib.admindocs',
145 # Added for django-suit form
146 TEMPLATE_CONTEXT_PROCESSORS = TCP + (
147 'django.core.context_processors.request',
150 # Django Suit configuration example
153 'ADMIN_NAME': 'PlanetStack',
154 # 'HEADER_DATE_FORMAT': 'l, j. F Y',
155 # 'HEADER_TIME_FORMAT': 'H:i',
158 #'SHOW_REQUIRED_ASTERISK': True, # Default True
159 'CONFIRM_UNSAVED_CHANGES': True, # Default True
162 # 'SEARCH_URL': '/admin/auth/user/',
164 # 'sites': 'icon-leaf',
165 # 'auth': 'icon-lock',
167 # 'MENU_OPEN_FIRST_CHILD': True, # Default True
168 'MENU_EXCLUDE': ('auth.group','auth'),
172 # {'app': 'auth', 'icon':'icon-lock', 'models': ('user', 'group')},
173 # {'label': 'Settings', 'icon':'icon-cog', 'models': ('auth.user', 'auth.group')},
174 # {'label': 'Support', 'icon':'icon-question-sign', 'url': '/support/'},
178 # 'LIST_PER_PAGE': 15
181 # A sample logging configuration. The only tangible logging
182 # performed by this configuration is to send an email to
183 # the site admins on every HTTP 500 error when DEBUG=False.
184 # See http://docs.djangoproject.com/en/dev/topics/logging for
185 # more details on how to customize your logging configuration.
188 'disable_existing_loggers': False,
190 'require_debug_false': {
191 '()': 'django.utils.log.RequireDebugFalse'
197 'filters': ['require_debug_false'],
198 'class': 'django.utils.log.AdminEmailHandler'
203 'handlers': ['mail_admins'],