bgneal@34: # Base Django settings for madeira project. bgneal@34: bgneal@34: import os bgneal@34: import django.utils.simplejson as json bgneal@34: bgneal@34: PROJECT_PATH = os.path.abspath(os.path.join(os.path.split(__file__)[0], '..')) bgneal@34: bgneal@34: DEBUG = True bgneal@34: TEMPLATE_DEBUG = DEBUG bgneal@34: bgneal@34: ADMINS = [ bgneal@34: ('Brian Neal', 'admin@surfguitar101.com'), bgneal@34: ] bgneal@34: bgneal@34: MANAGERS = ADMINS bgneal@34: bgneal@34: INTERNAL_IPS = ['127.0.0.1'] bgneal@34: bgneal@34: # Local time zone for this installation. Choices can be found here: bgneal@34: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name bgneal@34: # although not all choices may be available on all operating systems. bgneal@34: # If running in a Windows environment this must be set to the same as your bgneal@34: # system time zone. bgneal@34: TIME_ZONE = 'America/Chicago' bgneal@34: bgneal@34: # Language code for this installation. All choices can be found here: bgneal@34: # http://www.i18nguy.com/unicode/language-identifiers.html bgneal@34: LANGUAGE_CODE = 'en-us' bgneal@34: bgneal@34: SITE_ID = 1 bgneal@34: bgneal@34: # If you set this to False, Django will make some optimizations so as not bgneal@34: # to load the internationalization machinery. bgneal@34: USE_I18N = False bgneal@34: bgneal@34: # Absolute path to the directory that holds media. bgneal@34: # Example: "/home/media/media.lawrence.com/" bgneal@34: MEDIA_ROOT = os.path.abspath(os.path.join(PROJECT_PATH, '..', 'media')) bgneal@34: bgneal@34: # URL that handles the media served from MEDIA_ROOT. Make sure to use a bgneal@34: # trailing slash if there is a path component (optional in other cases). bgneal@34: # Examples: "http://media.lawrence.com", "http://example.com/media/" bgneal@34: MEDIA_URL = '/media/' bgneal@34: bgneal@34: # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a bgneal@34: # trailing slash. bgneal@34: # Examples: "http://foo.com/media/", "/media/". bgneal@34: ADMIN_MEDIA_PREFIX = '/static/admin/' bgneal@34: bgneal@34: # Staticfiles settings: bgneal@34: STATICFILES_DIRS = [ bgneal@34: os.path.abspath(os.path.join(PROJECT_PATH, '..', 'static')), bgneal@34: ] bgneal@34: STATIC_ROOT = '/tmp/test_madeira_static_root' bgneal@34: STATIC_URL = '/static/' bgneal@34: bgneal@34: # Make this unique, and don't share it with anybody. bgneal@34: SECRETS = json.load(open(os.path.join(PROJECT_PATH, 'settings', 'secrets.json'))) bgneal@34: SECRET_KEY = SECRETS['SECRET_KEY'] bgneal@34: bgneal@34: TEMPLATE_LOADERS = [ bgneal@34: 'django.template.loaders.filesystem.Loader', bgneal@34: 'django.template.loaders.app_directories.Loader', bgneal@34: # 'django.template.loaders.eggs.Loader', bgneal@34: ] bgneal@34: bgneal@34: MIDDLEWARE_CLASSES = [ bgneal@34: 'django.middleware.common.CommonMiddleware', bgneal@34: 'django.middleware.csrf.CsrfViewMiddleware', bgneal@34: 'django.contrib.sessions.middleware.SessionMiddleware', bgneal@34: 'django.contrib.messages.middleware.MessageMiddleware', bgneal@34: 'django.contrib.auth.middleware.AuthenticationMiddleware', bgneal@34: 'django.middleware.doc.XViewMiddleware', bgneal@34: 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', bgneal@34: ] bgneal@34: bgneal@34: ROOT_URLCONF = 'mysite.urls' bgneal@34: bgneal@34: # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". bgneal@34: # Always use forward slashes, even on Windows. bgneal@34: # Don't forget to use absolute paths, not relative paths. bgneal@34: TEMPLATE_DIRS = [ bgneal@34: os.path.join(PROJECT_PATH, 'templates'), bgneal@34: os.path.join(PROJECT_PATH, 'templates', 'band'), bgneal@34: os.path.join(PROJECT_PATH, 'photologue', 'templates'), bgneal@34: ] bgneal@34: bgneal@34: TEMPLATE_CONTEXT_PROCESSORS = [ bgneal@34: "django.contrib.auth.context_processors.auth", bgneal@34: "django.core.context_processors.debug", bgneal@34: "django.core.context_processors.request", bgneal@34: "django.core.context_processors.media", bgneal@34: "django.core.context_processors.static", bgneal@34: "django.contrib.messages.context_processors.messages", bgneal@34: ] bgneal@34: bgneal@34: INSTALLED_APPS = [ bgneal@34: 'django.contrib.admin', bgneal@34: 'django.contrib.admindocs', bgneal@34: 'django.contrib.auth', bgneal@34: 'django.contrib.contenttypes', bgneal@34: 'django.contrib.flatpages', bgneal@34: 'django.contrib.markup', bgneal@34: 'django.contrib.messages', bgneal@34: 'django.contrib.sessions', bgneal@34: 'django.contrib.sites', bgneal@34: 'django.contrib.staticfiles', bgneal@34: 'mysite.band', bgneal@34: 'mysite.photologue', bgneal@34: ] bgneal@34: bgneal@34: ####################################################################### bgneal@34: # Messages bgneal@34: ####################################################################### bgneal@34: MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' bgneal@34: bgneal@34: ####################################################################### bgneal@34: # Email bgneal@34: ####################################################################### bgneal@34: EMAIL_HOST = 'localhost' bgneal@34: EMAIL_PORT = 1025 bgneal@34: bgneal@34: ####################################################################### bgneal@34: # Sessions bgneal@34: ####################################################################### bgneal@34: SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" bgneal@34: SESSION_COOKIE_AGE = 2 * 7 * 24 * 60 * 60 # 2 weeks in seconds bgneal@34: SESSION_COOKIE_DOMAIN = None bgneal@34: SESSION_COOKIE_NAME = 'madeira_sessionid' bgneal@34: SESSION_COOKIE_PATH = '/' bgneal@34: SESSION_COOKIE_SECURE = False bgneal@34: SESSION_EXPIRE_AT_BROWSER_CLOSE = False bgneal@34: SESSION_SAVE_EVERY_REQUEST = False