Statistics
| Branch: | Tag: | Revision:

root / pithos / test-settings.py @ 95e92490

History | View | Annotate | Download (5.4 kB)

1
#coding=utf8
2

    
3
# Copyright 2011 GRNET S.A. All rights reserved.
4
# 
5
# Redistribution and use in source and binary forms, with or
6
# without modification, are permitted provided that the following
7
# conditions are met:
8
# 
9
#   1. Redistributions of source code must retain the above
10
#      copyright notice, this list of conditions and the following
11
#      disclaimer.
12
# 
13
#   2. Redistributions in binary form must reproduce the above
14
#      copyright notice, this list of conditions and the following
15
#      disclaimer in the documentation and/or other materials
16
#      provided with the distribution.
17
# 
18
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
19
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
22
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
25
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
# POSSIBILITY OF SUCH DAMAGE.
30
# 
31
# The views and conclusions contained in the software and
32
# documentation are those of the authors and should not be
33
# interpreted as representing official policies, either expressed
34
# or implied, of GRNET S.A.
35

    
36
# Django settings for pithos project.
37
import os
38

    
39
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
40

    
41
DEBUG = True
42
TEMPLATE_DEBUG = DEBUG
43

    
44
TEST = True
45

    
46
ADMINS = (
47
    # ('Your Name', 'your_email@domain.com'),
48
)
49

    
50
MANAGERS = ADMINS
51

    
52
DATABASES = {
53
    'default': {
54
        'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
55
        'NAME': PROJECT_PATH + 'pithos.db',                # Or path to database file if using sqlite3.
56
        'USER': '',                      # Not used with sqlite3.
57
        'PASSWORD': '',                  # Not used with sqlite3.
58
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
59
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
60
    }
61
}
62

    
63
# The backend to use and its initilization options.
64
if TEST:
65
    BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data/test/'),))
66
else:
67
    BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data/pithos/'),))
68

    
69
# Local time zone for this installation. Choices can be found here:
70
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
71
# although not all choices may be available on all operating systems.
72
# On Unix systems, a value of None will cause Django to use the same
73
# timezone as the operating system.
74
# If running in a Windows environment this must be set to the same as your
75
# system time zone.
76
TIME_ZONE = 'UTC'
77

    
78
# Language code for this installation. All choices can be found here:
79
# http://www.i18nguy.com/unicode/language-identifiers.html
80
LANGUAGE_CODE = 'en-us'
81

    
82
SITE_ID = 1
83

    
84
# If you set this to False, Django will make some optimizations so as not
85
# to load the internationalization machinery.
86
USE_I18N = True
87

    
88
# If you set this to False, Django will not format dates, numbers and
89
# calendars according to the current locale
90
USE_L10N = True
91

    
92
# Absolute filesystem path to the directory that will hold user-uploaded files.
93
# Example: "/home/media/media.lawrence.com/"
94
MEDIA_ROOT = ''
95

    
96
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
97
# trailing slash if there is a path component (optional in other cases).
98
# Examples: "http://media.lawrence.com", "http://example.com/media/"
99
MEDIA_URL = ''
100

    
101
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
102
# trailing slash.
103
# Examples: "http://foo.com/media/", "/media/".
104
ADMIN_MEDIA_PREFIX = '/media/'
105

    
106
# Make this unique, and don't share it with anybody.
107
SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si'
108

    
109
# List of callables that know how to import templates from various sources.
110
TEMPLATE_LOADERS = (
111
    'django.template.loaders.filesystem.Loader',
112
    'django.template.loaders.app_directories.Loader',
113
#     'django.template.loaders.eggs.Loader',
114
)
115

    
116
MIDDLEWARE_CLASSES = (
117
    'django.middleware.common.CommonMiddleware',
118
    'django.contrib.sessions.middleware.SessionMiddleware',
119
#    'django.middleware.csrf.CsrfViewMiddleware',
120
    'django.contrib.auth.middleware.AuthenticationMiddleware',
121
    'django.contrib.messages.middleware.MessageMiddleware',
122
    'pithos.middleware.LoggingConfigMiddleware',
123
    'pithos.api.auth.DummyAuthMiddleware'
124
)
125

    
126
ROOT_URLCONF = 'pithos.urls'
127

    
128
TEMPLATE_DIRS = (
129
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
130
    # Always use forward slashes, even on Windows.
131
    # Don't forget to use absolute paths, not relative paths.
132
)
133

    
134
INSTALLED_APPS = (
135
    'django.contrib.auth',
136
    'django.contrib.contenttypes',
137
    'django.contrib.sessions',
138
    'django.contrib.sites',
139
    'django.contrib.messages',
140
#    'django.contrib.admin',
141
#    'django.contrib.admindocs',
142
    'api',
143
        'public'
144
)
145

    
146
AUTH_TOKENS = {
147
    '0000': 'test',
148
    '0001': 'verigak',
149
    '0002': 'chazapis',
150
    '0003': 'gtsouk',
151
    '0004': 'papagian',
152
    '0005': 'louridas',
153
    '0006': 'chstath',
154
    '0007': 'pkanavos',
155
    '0008': 'mvasilak',
156
    '0009': 'διογένης'}