root / pithos / settings.py.dist @ b956618e
History | View | Annotate | Download (3.8 kB)
1 |
# Django settings for pithos project. |
---|---|
2 |
import os |
3 |
|
4 |
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/' |
5 |
|
6 |
DEBUG = True |
7 |
TEMPLATE_DEBUG = DEBUG |
8 |
|
9 |
# A quick-n-dirty way to know if we're running unit tests |
10 |
import sys |
11 |
TEST = False |
12 |
if len(sys.argv) >= 2: |
13 |
if os.path.basename(sys.argv[0]) == 'manage.py' and \ |
14 |
(sys.argv[1] == 'test' or sys.argv[1] == 'hudson'): |
15 |
TEST = True |
16 |
|
17 |
ADMINS = ( |
18 |
# ('Your Name', 'your_email@domain.com'), |
19 |
) |
20 |
|
21 |
MANAGERS = ADMINS |
22 |
|
23 |
DATABASES = { |
24 |
'default': { |
25 |
'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
26 |
'NAME': PROJECT_PATH + 'pithos.db', # Or path to database file if using sqlite3. |
27 |
'USER': '', # Not used with sqlite3. |
28 |
'PASSWORD': '', # Not used with sqlite3. |
29 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
30 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
31 |
} |
32 |
} |
33 |
|
34 |
# The backend to use and its initilization options. |
35 |
if TEST: |
36 |
BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'testdata'),)) |
37 |
else: |
38 |
BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data'),)) |
39 |
|
40 |
# Local time zone for this installation. Choices can be found here: |
41 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
42 |
# although not all choices may be available on all operating systems. |
43 |
# On Unix systems, a value of None will cause Django to use the same |
44 |
# timezone as the operating system. |
45 |
# If running in a Windows environment this must be set to the same as your |
46 |
# system time zone. |
47 |
TIME_ZONE = 'UTC' |
48 |
|
49 |
# Language code for this installation. All choices can be found here: |
50 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
51 |
LANGUAGE_CODE = 'en-us' |
52 |
|
53 |
SITE_ID = 1 |
54 |
|
55 |
# If you set this to False, Django will make some optimizations so as not |
56 |
# to load the internationalization machinery. |
57 |
USE_I18N = True |
58 |
|
59 |
# If you set this to False, Django will not format dates, numbers and |
60 |
# calendars according to the current locale |
61 |
USE_L10N = True |
62 |
|
63 |
# Absolute filesystem path to the directory that will hold user-uploaded files. |
64 |
# Example: "/home/media/media.lawrence.com/" |
65 |
MEDIA_ROOT = '' |
66 |
|
67 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
68 |
# trailing slash if there is a path component (optional in other cases). |
69 |
# Examples: "http://media.lawrence.com", "http://example.com/media/" |
70 |
MEDIA_URL = '' |
71 |
|
72 |
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
73 |
# trailing slash. |
74 |
# Examples: "http://foo.com/media/", "/media/". |
75 |
ADMIN_MEDIA_PREFIX = '/media/' |
76 |
|
77 |
# Make this unique, and don't share it with anybody. |
78 |
SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si' |
79 |
|
80 |
# List of callables that know how to import templates from various sources. |
81 |
TEMPLATE_LOADERS = ( |
82 |
'django.template.loaders.filesystem.Loader', |
83 |
'django.template.loaders.app_directories.Loader', |
84 |
# 'django.template.loaders.eggs.Loader', |
85 |
) |
86 |
|
87 |
MIDDLEWARE_CLASSES = ( |
88 |
'django.middleware.common.CommonMiddleware', |
89 |
'django.contrib.sessions.middleware.SessionMiddleware', |
90 |
# 'django.middleware.csrf.CsrfViewMiddleware', |
91 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
92 |
'django.contrib.messages.middleware.MessageMiddleware', |
93 |
'pithos.middleware.LoggingConfigMiddleware' |
94 |
) |
95 |
|
96 |
ROOT_URLCONF = 'pithos.urls' |
97 |
|
98 |
TEMPLATE_DIRS = ( |
99 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
100 |
# Always use forward slashes, even on Windows. |
101 |
# Don't forget to use absolute paths, not relative paths. |
102 |
) |
103 |
|
104 |
INSTALLED_APPS = ( |
105 |
'django.contrib.auth', |
106 |
'django.contrib.contenttypes', |
107 |
'django.contrib.sessions', |
108 |
'django.contrib.sites', |
109 |
'django.contrib.messages', |
110 |
# 'django.contrib.admin', |
111 |
# 'django.contrib.admindocs', |
112 |
'api' |
113 |
) |