root / pithos / test-settings.py @ 502687d0
History | View | Annotate | Download (5.3 kB)
1 |
# Copyright 2011 GRNET S.A. All rights reserved.
|
---|---|
2 |
#
|
3 |
# Redistribution and use in source and binary forms, with or
|
4 |
# without modification, are permitted provided that the following
|
5 |
# conditions are met:
|
6 |
#
|
7 |
# 1. Redistributions of source code must retain the above
|
8 |
# copyright notice, this list of conditions and the following
|
9 |
# disclaimer.
|
10 |
#
|
11 |
# 2. Redistributions in binary form must reproduce the above
|
12 |
# copyright notice, this list of conditions and the following
|
13 |
# disclaimer in the documentation and/or other materials
|
14 |
# provided with the distribution.
|
15 |
#
|
16 |
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
17 |
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
19 |
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
20 |
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
23 |
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
24 |
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
25 |
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
26 |
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27 |
# POSSIBILITY OF SUCH DAMAGE.
|
28 |
#
|
29 |
# The views and conclusions contained in the software and
|
30 |
# documentation are those of the authors and should not be
|
31 |
# interpreted as representing official policies, either expressed
|
32 |
# or implied, of GRNET S.A.
|
33 |
|
34 |
# Django settings for pithos project.
|
35 |
import os |
36 |
|
37 |
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
|
38 |
|
39 |
DEBUG = True
|
40 |
TEMPLATE_DEBUG = DEBUG |
41 |
|
42 |
TEST = True
|
43 |
|
44 |
ADMINS = ( |
45 |
# ('Your Name', 'your_email@domain.com'),
|
46 |
) |
47 |
|
48 |
MANAGERS = ADMINS |
49 |
|
50 |
DATABASES = { |
51 |
'default': {
|
52 |
'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
53 |
'NAME': PROJECT_PATH + 'pithos.db', # Or path to database file if using sqlite3. |
54 |
'USER': '', # Not used with sqlite3. |
55 |
'PASSWORD': '', # Not used with sqlite3. |
56 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
57 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
58 |
} |
59 |
} |
60 |
|
61 |
# The backend to use and its initilization options.
|
62 |
if TEST:
|
63 |
BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data/test/'),)) |
64 |
else:
|
65 |
BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data/pithos/'),)) |
66 |
|
67 |
# Local time zone for this installation. Choices can be found here:
|
68 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
69 |
# although not all choices may be available on all operating systems.
|
70 |
# On Unix systems, a value of None will cause Django to use the same
|
71 |
# timezone as the operating system.
|
72 |
# If running in a Windows environment this must be set to the same as your
|
73 |
# system time zone.
|
74 |
TIME_ZONE = 'UTC'
|
75 |
|
76 |
# Language code for this installation. All choices can be found here:
|
77 |
# http://www.i18nguy.com/unicode/language-identifiers.html
|
78 |
LANGUAGE_CODE = 'en-us'
|
79 |
|
80 |
SITE_ID = 1
|
81 |
|
82 |
# If you set this to False, Django will make some optimizations so as not
|
83 |
# to load the internationalization machinery.
|
84 |
USE_I18N = True
|
85 |
|
86 |
# If you set this to False, Django will not format dates, numbers and
|
87 |
# calendars according to the current locale
|
88 |
USE_L10N = True
|
89 |
|
90 |
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
91 |
# Example: "/home/media/media.lawrence.com/"
|
92 |
MEDIA_ROOT = ''
|
93 |
|
94 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
95 |
# trailing slash if there is a path component (optional in other cases).
|
96 |
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
97 |
MEDIA_URL = ''
|
98 |
|
99 |
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
100 |
# trailing slash.
|
101 |
# Examples: "http://foo.com/media/", "/media/".
|
102 |
ADMIN_MEDIA_PREFIX = '/media/'
|
103 |
|
104 |
# Make this unique, and don't share it with anybody.
|
105 |
SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si'
|
106 |
|
107 |
# List of callables that know how to import templates from various sources.
|
108 |
TEMPLATE_LOADERS = ( |
109 |
'django.template.loaders.filesystem.Loader',
|
110 |
'django.template.loaders.app_directories.Loader',
|
111 |
# 'django.template.loaders.eggs.Loader',
|
112 |
) |
113 |
|
114 |
MIDDLEWARE_CLASSES = ( |
115 |
'django.middleware.common.CommonMiddleware',
|
116 |
'django.contrib.sessions.middleware.SessionMiddleware',
|
117 |
# 'django.middleware.csrf.CsrfViewMiddleware',
|
118 |
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
119 |
'django.contrib.messages.middleware.MessageMiddleware',
|
120 |
'pithos.middleware.LoggingConfigMiddleware',
|
121 |
'pithos.api.auth.DummyAuthMiddleware'
|
122 |
) |
123 |
|
124 |
ROOT_URLCONF = 'pithos.urls'
|
125 |
|
126 |
TEMPLATE_DIRS = ( |
127 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
128 |
# Always use forward slashes, even on Windows.
|
129 |
# Don't forget to use absolute paths, not relative paths.
|
130 |
) |
131 |
|
132 |
INSTALLED_APPS = ( |
133 |
'django.contrib.auth',
|
134 |
'django.contrib.contenttypes',
|
135 |
'django.contrib.sessions',
|
136 |
'django.contrib.sites',
|
137 |
'django.contrib.messages',
|
138 |
# 'django.contrib.admin',
|
139 |
# 'django.contrib.admindocs',
|
140 |
'api',
|
141 |
'public'
|
142 |
) |
143 |
|
144 |
AUTH_TOKENS = { |
145 |
'0000': 'test', |
146 |
'0001': 'verigak', |
147 |
'0002': 'chazapis', |
148 |
'0003': 'gtsouk', |
149 |
'0004': 'papagian', |
150 |
'0005': 'louridas', |
151 |
'0006': 'chstath', |
152 |
'0007': 'pkanavos', |
153 |
'0008': 'mvasilak'} |