web/hgbook/settings.py~
author amit@thunder
Mon, 25 Jan 2010 18:56:45 +0530
changeset 0 8083d21c0020
permissions -rw-r--r--
The first commit of all the required files for the review app
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     1
# Django settings for hgbook project.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     2
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     3
import os, sys
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     4
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     5
DEBUG = True
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     6
TEMPLATE_DEBUG = DEBUG
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     7
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     8
ADMINS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
     9
    ("Bryan O'Sullivan", 'bos@serpentine.com'),
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    10
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    11
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    12
MANAGERS = ADMINS
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    13
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    14
ROOT = os.path.dirname(sys.modules[__name__].__file__)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    15
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    16
DJAPIAN_DATABASE_PATH = '/path/to/my/project/data/djapian/'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    17
DJAPIAN_STEMMING_LANG = 'en'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    18
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    19
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    20
try:
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    21
    from secrets import DATABASE_ENGINE, DATABASE_NAME, DATABASE_USER, \
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    22
         DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, SECRET_KEY
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    23
except ImportError:
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    24
    print >> sys.stderr, 'Faking up some database configuration for you'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    25
    DATABASE_ENGINE = 'sqlite3'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    26
    DATABASE_NAME = os.path.join(ROOT, '.database.sqlite3')
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    27
    DATABASE_USER = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    28
    DATABASE_PASSWORD = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    29
    DATABASE_HOST = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    30
    DATABASE_PORT = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    31
    SECRET_KEY = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    32
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    33
# Local time zone for this installation. Choices can be found here:
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    34
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    35
# although not all choices may be avilable on all operating systems.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    36
# If running in a Windows environment this must be set to the same as your
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    37
# system time zone.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    38
TIME_ZONE = 'America/Los_Angeles'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    39
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    40
# Language code for this installation. All choices can be found here:
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    41
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    42
LANGUAGE_CODE = 'en-us'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    43
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    44
SITE_ID = 1
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    45
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    46
# If you set this to False, Django will make some optimizations so as not
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    47
# to load the internationalization machinery.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    48
USE_I18N = True
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    49
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    50
# Absolute path to the directory that holds media.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    51
# Example: "/home/media/media.lawrence.com/"
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    52
MEDIA_ROOT = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    53
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    54
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    55
# trailing slash if there is a path component (optional in other cases).
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    56
# Examples: "http://media.lawrence.com", "http://example.com/media/"
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    57
MEDIA_URL = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    58
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    59
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    60
# trailing slash.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    61
# Examples: "http://foo.com/media/", "/media/".
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    62
ADMIN_MEDIA_PREFIX = '/media/'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    63
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    64
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    65
#Index Directories for searching static html files
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    66
DD_SEARCH_INDEX_DIR = '../html/'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    67
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    68
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    69
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    70
# List of callables that know how to import templates from various sources.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    71
TEMPLATE_LOADERS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    72
    'django.template.loaders.filesystem.load_template_source',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    73
    'django.template.loaders.app_directories.load_template_source',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    74
#     'django.template.loaders.eggs.load_template_source',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    75
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    76
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    77
MIDDLEWARE_CLASSES = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    78
    'django.middleware.common.CommonMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    79
    'django.contrib.sessions.middleware.SessionMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    80
    'django.contrib.auth.middleware.AuthenticationMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    81
    'django.middleware.doc.XViewMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    82
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    83
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    84
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    85
ROOT_URLCONF = 'hgbook.urls'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    86
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    87
TEMPLATE_DIRS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    88
    os.path.join(ROOT, 'templates')
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    89
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    90
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    91
INSTALLED_APPS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    92
    'django.contrib.admin',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    93
    'django.contrib.auth',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    94
    'django.contrib.contenttypes',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    95
    'django.contrib.sessions',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    96
    'django.contrib.sites',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    97
    'django.contrib.flatpages',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    98
    'hgbook.comments',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    99
)