/examples/blogserver/settings.py
Python | 95 lines | 56 code | 18 blank | 21 comment | 0 complexity | e3688aab66819288db38f118381c4ca8 MD5 | raw file
1import os, sys 2 3DEBUG = True 4TEMPLATE_DEBUG = DEBUG 5 6ADMINS = ( 7 # ('Your Name', 'your_email@domain.com'), 8) 9 10MANAGERS = ADMINS 11 12BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 13 14# Fix up piston imports here. We would normally place piston in 15# a directory accessible via the Django app, but this is an 16# example and we ship it a couple of directories up. 17sys.path.insert(0, os.path.join(BASE_DIR, '../../')) 18 19DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 20DATABASE_NAME = os.path.join(BASE_DIR, 'db') # Or path to database file if using sqlite3. 21#DATABASE_USER = '' # Not used with sqlite3. 22#DATABASE_PASSWORD = '' # Not used with sqlite3. 23#DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. 24#DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. 25 26# Local time zone for this installation. Choices can be found here: 27# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 28# although not all choices may be available on all operating systems. 29# If running in a Windows environment this must be set to the same as your 30# system time zone. 31TIME_ZONE = 'America/Chicago' 32 33# Language code for this installation. All choices can be found here: 34# http://www.i18nguy.com/unicode/language-identifiers.html 35LANGUAGE_CODE = 'en-us' 36 37SITE_ID = 1 38 39# If you set this to False, Django will make some optimizations so as not 40# to load the internationalization machinery. 41USE_I18N = True 42 43# Absolute path to the directory that holds media. 44# Example: "/home/media/media.lawrence.com/" 45MEDIA_ROOT = '' 46 47# URL that handles the media served from MEDIA_ROOT. Make sure to use a 48# trailing slash if there is a path component (optional in other cases). 49# Examples: "http://media.lawrence.com", "http://example.com/media/" 50MEDIA_URL = '' 51 52# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 53# trailing slash. 54# Examples: "http://foo.com/media/", "/media/". 55ADMIN_MEDIA_PREFIX = '/media/' 56 57# Make this unique, and don't share it with anybody. 58SECRET_KEY = 'f@vhy8vuq7w70v=cnynm(am1__*zt##i2--i2p-021@-qgws%g' 59 60# List of callables that know how to import templates from various sources. 61TEMPLATE_LOADERS = ( 62 'django.template.loaders.filesystem.load_template_source', 63 'django.template.loaders.app_directories.load_template_source', 64# 'django.template.loaders.eggs.load_template_source', 65) 66 67MIDDLEWARE_CLASSES = ( 68 'django.middleware.common.CommonMiddleware', 69 'django.contrib.sessions.middleware.SessionMiddleware', 70 'django.contrib.auth.middleware.AuthenticationMiddleware', 71) 72 73ROOT_URLCONF = 'blogserver.urls' 74 75TEMPLATE_DIRS = ( 76 os.path.join(BASE_DIR, 'templates'), 77 os.path.join(BASE_DIR, '../../piston/templates'), 78) 79 80INSTALLED_APPS = ( 81 'django.contrib.auth', 82 'django.contrib.contenttypes', 83 'django.contrib.sessions', 84 'django.contrib.sites', 85 'django.contrib.admin', 86 'django.contrib.markup', 87 'blogserver.blog', 88 'blogserver.api', 89) 90 91FIXTURE_DIRS = ( 92 os.path.join(BASE_DIR, 'fixtures'), 93) 94 95APPEND_SLASH = False