SEESenv/web/hgbook/settings.py
author amit@thunder
Mon, 22 Feb 2010 18:46:07 +0530
changeset 23 d2855b0d6df8
parent 11 a7bd4bca6f6e
permissions -rwxr-xr-x
some problems with sqlite database
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
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    17
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    18
try:
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    19
    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
    20
         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
    21
except ImportError:
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    22
    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
    23
    DATABASE_ENGINE = 'sqlite3'
23
d2855b0d6df8 some problems with sqlite database
amit@thunder
parents: 11
diff changeset
    24
    DATABASE_NAME = '/home/hg/repos/SEES-hacks/SEESenv/web/hgbook/.database.sqlite3'
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    25
    DATABASE_USER = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    26
    DATABASE_PASSWORD = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    27
    DATABASE_HOST = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    28
    DATABASE_PORT = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    29
    SECRET_KEY = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    30
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    31
# 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
    32
# 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
    33
# 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
    34
# 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
    35
# system time zone.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    36
TIME_ZONE = 'America/Los_Angeles'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    37
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    38
# 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
    39
# 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
    40
LANGUAGE_CODE = 'en-us'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    41
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    42
SITE_ID = 1
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
# 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
    45
# to load the internationalization machinery.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    46
USE_I18N = True
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    47
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    48
# 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
    49
# Example: "/home/media/media.lawrence.com/"
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    50
MEDIA_ROOT = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    51
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    52
# 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
    53
# 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
    54
# 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
    55
MEDIA_URL = ''
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    56
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    57
# 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
    58
# trailing slash.
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    59
# Examples: "http://foo.com/media/", "/media/".
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    60
ADMIN_MEDIA_PREFIX = '/media/'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    61
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    62
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    63
#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
    64
DD_SEARCH_INDEX_DIR = '../html/'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    65
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    66
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
# 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
    69
TEMPLATE_LOADERS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    70
    '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
    71
    '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
    72
#     '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
    73
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    74
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    75
MIDDLEWARE_CLASSES = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    76
    'django.middleware.common.CommonMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    77
    'django.contrib.sessions.middleware.SessionMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    78
    'django.contrib.auth.middleware.AuthenticationMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    79
    'django.middleware.doc.XViewMiddleware',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    80
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    81
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    82
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    83
ROOT_URLCONF = 'hgbook.urls'
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
TEMPLATE_DIRS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    86
    os.path.join(ROOT, 'templates')
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    87
)
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    88
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    89
INSTALLED_APPS = (
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    90
    'django.contrib.admin',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    91
    'django.contrib.auth',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    92
    'django.contrib.contenttypes',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    93
    'django.contrib.sessions',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    94
    'django.contrib.sites',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    95
    'django.contrib.flatpages',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    96
    'hgbook.comments',
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    97
)