# Django settings for blt project. import os import sys DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Example Joe', 'admin@example.com') ) MANAGERS = ADMINS # Local time zone for this installation. All choices can be found here: # http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE TIME_ZONE = 'US/Pacific' # Language code for this installation. All choices can be found here: # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes # http://blogs.law.harvard.edu/tech/stories/storyReader$15 LANGUAGE_CODE = 'en-us' SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". ADMIN_MEDIA_PREFIX = '/media/' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', # 'django.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', ) TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.request', 'djblets.util.context_processors.settingsVars', ) ROOT_URLCONF = 'blt.urls' BLT_ROOT = os.path.abspath(os.path.split(__file__)[0]) HTDOCS_ROOT = os.path.join(BLT_ROOT, 'htdocs') MEDIA_ROOT = HTDOCS_ROOT MEDIA_URL = '/' GALLERY_DIR = os.path.join('images', 'gallery') THUMBNAIL_DIR = os.path.join('images', 'thumbnails') TEMPLATE_DIRS = ( # Don't forget to use absolute paths, not relative paths. os.path.join(BLT_ROOT, 'templates'), ) INSTALLED_APPS = ( 'blt.gallery', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sites', 'django.contrib.sessions', 'djblets.datagrid', 'djblets.util', 'tagging', ) #AUTH_PROFILE_MODULE = "accounts.Profile" LOGIN_URL = "/account/login" ALLOW_REGISTRATION = True # Default expiration time for the cache. Note that this has no effect unless # CACHE_BACKEND is specified in settings_local.py CACHE_EXPIRATION_TIME = 60 * 60 * 24 * 30 # 1 month # Custom test runner, which uses nose to find tests and execute them. This # gives us a somewhat more comprehensive test execution than django's built-in # runner, as well as some special features like a code coverage report. TEST_RUNNER = 'blt.test.runner' def dependency_error(string): sys.stderr.write('%s\n' % string) sys.exit(1) if os.path.split(os.path.dirname(__file__))[1] != 'blt': dependency_error('The directory containing manage.py must be named "blt"') # Load local settings. This can override anything in here, but at the very # least it needs to define database connectivity. try: from settings_local import * except ImportError: dependency_error('Unable to read settings_local.py.') SESSION_COOKIE_AGE = 365 * 24 * 60 * 60 # 1 year