bgneal@1: # Django base settings for bns_website project. bgneal@1: bgneal@27: import django.utils.simplejson as json bgneal@1: import os bgneal@1: bgneal@1: PROJECT_PATH = os.path.abspath(os.path.join(os.path.split(__file__)[0], '..')) bgneal@0: bgneal@0: DEBUG = True bgneal@0: TEMPLATE_DEBUG = DEBUG bgneal@0: bgneal@1: ADMINS = [ bgneal@26: ('Bob Mourlam', 'bob.mourlam@gmail.com'), bgneal@1: ('Brian Neal', 'bgneal@gmail.com'), bgneal@26: ('Chris Ridgway', 'ckridgway@gmail.com'), bgneal@1: ] bgneal@0: bgneal@0: MANAGERS = ADMINS bgneal@0: bgneal@0: # Local time zone for this installation. Choices can be found here: bgneal@0: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name bgneal@0: # although not all choices may be available on all operating systems. bgneal@0: # On Unix systems, a value of None will cause Django to use the same bgneal@0: # timezone as the operating system. bgneal@0: # If running in a Windows environment this must be set to the same as your bgneal@0: # system time zone. bgneal@0: TIME_ZONE = 'America/Chicago' bgneal@0: bgneal@0: # Language code for this installation. All choices can be found here: bgneal@0: # http://www.i18nguy.com/unicode/language-identifiers.html bgneal@0: LANGUAGE_CODE = 'en-us' bgneal@0: bgneal@0: SITE_ID = 1 bgneal@0: bgneal@0: # If you set this to False, Django will make some optimizations so as not bgneal@0: # to load the internationalization machinery. bgneal@1: USE_I18N = False bgneal@0: bgneal@0: # If you set this to False, Django will not format dates, numbers and bgneal@0: # calendars according to the current locale bgneal@0: USE_L10N = True bgneal@0: bgneal@0: # Absolute filesystem path to the directory that will hold user-uploaded files. bgneal@0: # Example: "/home/media/media.lawrence.com/media/" bgneal@26: MEDIA_ROOT = os.path.abspath(os.path.join(PROJECT_PATH, '..', '..', 'media')) bgneal@0: bgneal@0: # URL that handles the media served from MEDIA_ROOT. Make sure to use a bgneal@0: # trailing slash. bgneal@0: # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" bgneal@1: MEDIA_URL = '/media/' bgneal@0: bgneal@0: # Absolute path to the directory static files should be collected to. bgneal@0: # Don't put anything in this directory yourself; store your static files bgneal@0: # in apps' "static/" subdirectories and in STATICFILES_DIRS. bgneal@0: # Example: "/home/media/media.lawrence.com/static/" bgneal@26: STATIC_ROOT = os.path.abspath(os.path.join(PROJECT_PATH, '..', '..', 'static')) bgneal@0: bgneal@0: # URL prefix for static files. bgneal@0: # Example: "http://media.lawrence.com/static/" bgneal@0: STATIC_URL = '/static/' bgneal@0: bgneal@0: # URL prefix for admin static files -- CSS, JavaScript and images. bgneal@0: # Make sure to use a trailing slash. bgneal@0: # Examples: "http://foo.com/static/admin/", "/static/admin/". bgneal@0: ADMIN_MEDIA_PREFIX = '/static/admin/' bgneal@0: bgneal@0: # Additional locations of static files bgneal@1: STATICFILES_DIRS = [ bgneal@0: # Put strings here, like "/home/html/static" or "C:/www/django/static". bgneal@0: # Always use forward slashes, even on Windows. bgneal@0: # Don't forget to use absolute paths, not relative paths. bgneal@1: os.path.join(PROJECT_PATH, 'static'), bgneal@1: ] bgneal@0: bgneal@0: # List of finder classes that know how to find static files in bgneal@0: # various locations. bgneal@0: STATICFILES_FINDERS = ( bgneal@0: 'django.contrib.staticfiles.finders.FileSystemFinder', bgneal@0: 'django.contrib.staticfiles.finders.AppDirectoriesFinder', bgneal@0: # 'django.contrib.staticfiles.finders.DefaultStorageFinder', bgneal@0: ) bgneal@0: bgneal@0: # Make this unique, and don't share it with anybody. bgneal@1: SECRETS = json.load(open(os.path.join(PROJECT_PATH, 'settings', 'secrets.json'))) bgneal@1: SECRET_KEY = SECRETS['SECRET_KEY'] bgneal@0: bgneal@0: # List of callables that know how to import templates from various sources. bgneal@0: TEMPLATE_LOADERS = ( bgneal@0: 'django.template.loaders.filesystem.Loader', bgneal@0: 'django.template.loaders.app_directories.Loader', bgneal@0: # 'django.template.loaders.eggs.Loader', bgneal@0: ) bgneal@0: bgneal@1: MIDDLEWARE_CLASSES = [ bgneal@0: 'django.middleware.common.CommonMiddleware', bgneal@0: 'django.contrib.sessions.middleware.SessionMiddleware', bgneal@0: 'django.middleware.csrf.CsrfViewMiddleware', bgneal@0: 'django.contrib.auth.middleware.AuthenticationMiddleware', bgneal@0: 'django.contrib.messages.middleware.MessageMiddleware', bgneal@1: ] bgneal@0: bgneal@0: ROOT_URLCONF = 'bns_website.urls' bgneal@0: bgneal@1: TEMPLATE_DIRS = [ bgneal@0: # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". bgneal@0: # Always use forward slashes, even on Windows. bgneal@0: # Don't forget to use absolute paths, not relative paths. bgneal@1: os.path.join(PROJECT_PATH, 'templates'), bgneal@1: ] bgneal@0: bgneal@1: TEMPLATE_CONTEXT_PROCESSORS = [ bgneal@1: 'django.contrib.auth.context_processors.auth', bgneal@1: 'django.core.context_processors.debug', bgneal@1: 'django.core.context_processors.request', bgneal@1: 'django.core.context_processors.media', bgneal@1: 'django.core.context_processors.static', bgneal@1: ] bgneal@1: bgneal@1: INSTALLED_APPS = [ bgneal@0: 'django.contrib.auth', bgneal@0: 'django.contrib.contenttypes', bgneal@0: 'django.contrib.sessions', bgneal@0: 'django.contrib.sites', bgneal@0: 'django.contrib.messages', bgneal@0: 'django.contrib.staticfiles', bgneal@1: 'django.contrib.admin', bgneal@1: 'django.contrib.admindocs', bgneal@3: 'core', bgneal@6: 'bands', bob@14: 'news', ckridgway@16: 'reviews', bgneal@60: 'videos', bgneal@1: ] bgneal@0: bgneal@0: # A sample logging configuration. The only tangible logging bgneal@0: # performed by this configuration is to send an email to bgneal@0: # the site admins on every HTTP 500 error. bgneal@0: # See http://docs.djangoproject.com/en/dev/topics/logging for bgneal@0: # more details on how to customize your logging configuration. bgneal@0: LOGGING = { bgneal@0: 'version': 1, bgneal@0: 'disable_existing_loggers': False, bgneal@0: 'handlers': { bgneal@0: 'mail_admins': { bgneal@0: 'level': 'ERROR', bgneal@0: 'class': 'django.utils.log.AdminEmailHandler' bgneal@0: } bgneal@0: }, bgneal@0: 'loggers': { bgneal@0: 'django.request': { bgneal@0: 'handlers': ['mail_admins'], bgneal@0: 'level': 'ERROR', bgneal@0: 'propagate': True, bgneal@0: }, bgneal@0: } bgneal@0: } bgneal@29: bgneal@29: ####################################################################### bgneal@29: # 3rd party Javascript and CSS files. bgneal@29: # bgneal@29: # Listed here to for DRY purposes. bgneal@29: # bgneal@29: THIRD_PARTY_JS = { bgneal@29: 'tiny_mce': [ bgneal@29: 'js/tinymce/jscripts/tiny_mce/tiny_mce.js', bgneal@29: 'js/tiny_mce_init.js', bgneal@29: ], bgneal@29: } bgneal@29: bgneal@29: THIRD_PARTY_CSS = { bgneal@29: }