Statistics
| Branch: | Tag: | Revision:

root / pithos / settings.py.dist @ ee1a7617

History | View | Annotate | Download (6.2 kB)

1 5635f9ef Antony Chazapis
# Copyright 2011 GRNET S.A. All rights reserved.
2 5635f9ef Antony Chazapis
# 
3 5635f9ef Antony Chazapis
# Redistribution and use in source and binary forms, with or
4 5635f9ef Antony Chazapis
# without modification, are permitted provided that the following
5 5635f9ef Antony Chazapis
# conditions are met:
6 5635f9ef Antony Chazapis
# 
7 5635f9ef Antony Chazapis
#   1. Redistributions of source code must retain the above
8 5635f9ef Antony Chazapis
#      copyright notice, this list of conditions and the following
9 5635f9ef Antony Chazapis
#      disclaimer.
10 5635f9ef Antony Chazapis
# 
11 5635f9ef Antony Chazapis
#   2. Redistributions in binary form must reproduce the above
12 5635f9ef Antony Chazapis
#      copyright notice, this list of conditions and the following
13 5635f9ef Antony Chazapis
#      disclaimer in the documentation and/or other materials
14 5635f9ef Antony Chazapis
#      provided with the distribution.
15 5635f9ef Antony Chazapis
# 
16 5635f9ef Antony Chazapis
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
17 5635f9ef Antony Chazapis
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 5635f9ef Antony Chazapis
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 5635f9ef Antony Chazapis
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
20 5635f9ef Antony Chazapis
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 5635f9ef Antony Chazapis
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 5635f9ef Antony Chazapis
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 5635f9ef Antony Chazapis
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 5635f9ef Antony Chazapis
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 5635f9ef Antony Chazapis
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26 5635f9ef Antony Chazapis
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 5635f9ef Antony Chazapis
# POSSIBILITY OF SUCH DAMAGE.
28 5635f9ef Antony Chazapis
# 
29 5635f9ef Antony Chazapis
# The views and conclusions contained in the software and
30 5635f9ef Antony Chazapis
# documentation are those of the authors and should not be
31 5635f9ef Antony Chazapis
# interpreted as representing official policies, either expressed
32 5635f9ef Antony Chazapis
# or implied, of GRNET S.A.
33 5635f9ef Antony Chazapis
34 b956618e Antony Chazapis
# Django settings for pithos project.
35 b956618e Antony Chazapis
import os
36 b956618e Antony Chazapis
37 b956618e Antony Chazapis
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
38 b956618e Antony Chazapis
39 b956618e Antony Chazapis
DEBUG = True
40 b956618e Antony Chazapis
TEMPLATE_DEBUG = DEBUG
41 b956618e Antony Chazapis
42 b956618e Antony Chazapis
TEST = False
43 b956618e Antony Chazapis
44 b956618e Antony Chazapis
ADMINS = (
45 b956618e Antony Chazapis
    # ('Your Name', 'your_email@domain.com'),
46 b956618e Antony Chazapis
)
47 b956618e Antony Chazapis
48 b956618e Antony Chazapis
MANAGERS = ADMINS
49 b956618e Antony Chazapis
50 b956618e Antony Chazapis
DATABASES = {
51 b956618e Antony Chazapis
    'default': {
52 10283860 Sofia Papagiannaki
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
53 b956618e Antony Chazapis
        'NAME': PROJECT_PATH + 'pithos.db',		# Or path to database file if using sqlite3.
54 b956618e Antony Chazapis
        'USER': '',                      # Not used with sqlite3.
55 b956618e Antony Chazapis
        'PASSWORD': '',                  # Not used with sqlite3.
56 b956618e Antony Chazapis
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
57 b956618e Antony Chazapis
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
58 b956618e Antony Chazapis
    }
59 b956618e Antony Chazapis
}
60 b956618e Antony Chazapis
61 b956618e Antony Chazapis
# The backend to use and its initilization options.
62 2c5363a0 Antony Chazapis
63 2c5363a0 Antony Chazapis
# Modular.
64 2c5363a0 Antony Chazapis
backend_module = 'pithos.backends.lib.sqlite'
65 2c5363a0 Antony Chazapis
backend_path = os.path.join(PROJECT_PATH, 'data/pithos/')
66 2c5363a0 Antony Chazapis
backend_db = os.path.join(PROJECT_PATH, 'data/pithos/db')
67 2c5363a0 Antony Chazapis
#backend_module = 'pithos.backends.lib.sqlalchemy'
68 2c5363a0 Antony Chazapis
#backend_path = os.path.join(PROJECT_PATH, 'data/pithos/')
69 2c5363a0 Antony Chazapis
#backend_db = 'postgresql://user:pass@host/db'
70 2c5363a0 Antony Chazapis
BACKEND = ('ModularBackend', (backend_module, backend_path, backend_db))
71 b956618e Antony Chazapis
72 552ea518 Antony Chazapis
# Bypass authentication for user administration.
73 b8f6710f Giorgos Verigakis
BYPASS_ADMIN_AUTH = False
74 b8f6710f Giorgos Verigakis
75 b956618e Antony Chazapis
# Local time zone for this installation. Choices can be found here:
76 b956618e Antony Chazapis
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
77 b956618e Antony Chazapis
# although not all choices may be available on all operating systems.
78 b956618e Antony Chazapis
# On Unix systems, a value of None will cause Django to use the same
79 b956618e Antony Chazapis
# timezone as the operating system.
80 b956618e Antony Chazapis
# If running in a Windows environment this must be set to the same as your
81 b956618e Antony Chazapis
# system time zone.
82 b956618e Antony Chazapis
TIME_ZONE = 'UTC'
83 b956618e Antony Chazapis
84 b956618e Antony Chazapis
# Language code for this installation. All choices can be found here:
85 b956618e Antony Chazapis
# http://www.i18nguy.com/unicode/language-identifiers.html
86 b956618e Antony Chazapis
LANGUAGE_CODE = 'en-us'
87 b956618e Antony Chazapis
88 b956618e Antony Chazapis
SITE_ID = 1
89 b956618e Antony Chazapis
90 b956618e Antony Chazapis
# If you set this to False, Django will make some optimizations so as not
91 b956618e Antony Chazapis
# to load the internationalization machinery.
92 b956618e Antony Chazapis
USE_I18N = True
93 b956618e Antony Chazapis
94 b956618e Antony Chazapis
# If you set this to False, Django will not format dates, numbers and
95 b956618e Antony Chazapis
# calendars according to the current locale
96 b956618e Antony Chazapis
USE_L10N = True
97 b956618e Antony Chazapis
98 b956618e Antony Chazapis
# Absolute filesystem path to the directory that will hold user-uploaded files.
99 b956618e Antony Chazapis
# Example: "/home/media/media.lawrence.com/"
100 b956618e Antony Chazapis
MEDIA_ROOT = ''
101 b956618e Antony Chazapis
102 b956618e Antony Chazapis
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
103 b956618e Antony Chazapis
# trailing slash if there is a path component (optional in other cases).
104 b956618e Antony Chazapis
# Examples: "http://media.lawrence.com", "http://example.com/media/"
105 b956618e Antony Chazapis
MEDIA_URL = ''
106 b956618e Antony Chazapis
107 b956618e Antony Chazapis
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
108 b956618e Antony Chazapis
# trailing slash.
109 b956618e Antony Chazapis
# Examples: "http://foo.com/media/", "/media/".
110 b956618e Antony Chazapis
ADMIN_MEDIA_PREFIX = '/media/'
111 b956618e Antony Chazapis
112 b956618e Antony Chazapis
# Make this unique, and don't share it with anybody.
113 b956618e Antony Chazapis
SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si'
114 b956618e Antony Chazapis
115 b956618e Antony Chazapis
# List of callables that know how to import templates from various sources.
116 b956618e Antony Chazapis
TEMPLATE_LOADERS = (
117 b956618e Antony Chazapis
    'django.template.loaders.filesystem.Loader',
118 b956618e Antony Chazapis
    'django.template.loaders.app_directories.Loader',
119 b956618e Antony Chazapis
#     'django.template.loaders.eggs.Loader',
120 b956618e Antony Chazapis
)
121 b956618e Antony Chazapis
122 b956618e Antony Chazapis
MIDDLEWARE_CLASSES = (
123 b956618e Antony Chazapis
    'django.middleware.common.CommonMiddleware',
124 d7d60147 Antony Chazapis
#    'django.contrib.sessions.middleware.SessionMiddleware',
125 b956618e Antony Chazapis
#    'django.middleware.csrf.CsrfViewMiddleware',
126 d7d60147 Antony Chazapis
#    'django.contrib.auth.middleware.AuthenticationMiddleware',
127 d7d60147 Antony Chazapis
#    'django.contrib.messages.middleware.MessageMiddleware',
128 aa4fac11 Giorgos Verigakis
    'pithos.middleware.LoggingConfigMiddleware',
129 d7d60147 Antony Chazapis
    'pithos.middleware.AuthMiddleware'
130 b956618e Antony Chazapis
)
131 b956618e Antony Chazapis
132 b956618e Antony Chazapis
ROOT_URLCONF = 'pithos.urls'
133 b956618e Antony Chazapis
134 b956618e Antony Chazapis
TEMPLATE_DIRS = (
135 b956618e Antony Chazapis
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
136 b956618e Antony Chazapis
    # Always use forward slashes, even on Windows.
137 b956618e Antony Chazapis
    # Don't forget to use absolute paths, not relative paths.
138 b956618e Antony Chazapis
)
139 b956618e Antony Chazapis
140 b956618e Antony Chazapis
INSTALLED_APPS = (
141 d7d60147 Antony Chazapis
#    'django.contrib.auth',
142 d7d60147 Antony Chazapis
#    'django.contrib.contenttypes',
143 d7d60147 Antony Chazapis
#    'django.contrib.sessions',
144 d7d60147 Antony Chazapis
#    'django.contrib.sites',
145 d7d60147 Antony Chazapis
#    'django.contrib.messages',
146 b956618e Antony Chazapis
#    'django.contrib.admin',
147 b956618e Antony Chazapis
#    'django.contrib.admindocs',
148 7e392d16 Antony Chazapis
    'pithos.im',
149 502687d0 Antony Chazapis
    'pithos.api',
150 502687d0 Antony Chazapis
    'pithos.public'
151 b956618e Antony Chazapis
)
152 aa4fac11 Giorgos Verigakis
153 d7d60147 Antony Chazapis
# Set the expiration time of newly created auth tokens
154 d7d60147 Antony Chazapis
# to be this many hours after their creation time.
155 d7d60147 Antony Chazapis
AUTH_TOKEN_DURATION = 30 * 24
156 d7d60147 Antony Chazapis
157 b2832c6a Antony Chazapis
# Default setting for new accounts.
158 b2832c6a Antony Chazapis
DEFAULT_QUOTA = 50 * 1024 * 1024 * 1024
159 b2832c6a Antony Chazapis
DEFAULT_VERSIONING = 'auto'
160 393196a8 Giorgos Verigakis
161 b6b41731 Antony Chazapis
# Show these many users per page in admin interface.
162 65114032 Giorgos Verigakis
ADMIN_PAGE_LIMIT = 100
163 1a7c659b Antony Chazapis
164 1a7c659b Antony Chazapis
# Authenticate via Twitter.
165 cd1cd9ae Antony Chazapis
TWITTER_KEY = ''
166 1a7c659b Antony Chazapis
TWITTER_SECRET = ''
167 93f046ab Giorgos Verigakis
168 93f046ab Giorgos Verigakis
# Address to use for outgoing emails
169 93f046ab Giorgos Verigakis
DEFAULT_FROM_EMAIL = 'Pithos <no-reply@grnet.gr>'
170 93f046ab Giorgos Verigakis
171 93f046ab Giorgos Verigakis
# Where users should login with their invitation code
172 93f046ab Giorgos Verigakis
INVITATION_LOGIN_TARGET = 'https://pithos.dev.grnet.gr/im/login/invitation' \
173 93f046ab Giorgos Verigakis
                            '?code=%d' \
174 93f046ab Giorgos Verigakis
                            '&next=https://pithos.dev.grnet.gr/ui'
175 ee1a7617 Antony Chazapis
176 ee1a7617 Antony Chazapis
# Use to log to a file.
177 ee1a7617 Antony Chazapis
LOGFILE = None