1 # Copyright 2011 GRNET S.A. All rights reserved.
3 # Redistribution and use in source and binary forms, with or
4 # without modification, are permitted provided that the following
7 # 1. Redistributions of source code must retain the above
8 # copyright notice, this list of conditions and the following
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.
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.
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.
34 # Django settings for pithos project.
37 PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
40 TEMPLATE_DEBUG = DEBUG
45 # ('Your Name', 'your_email@domain.com'),
52 'ENGINE': 'django.db.backends.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.
61 # The backend to use and its initilization options.
64 #backend_path = os.path.join(PROJECT_PATH, 'data/pithos/')
65 #backend_db = os.path.join(PROJECT_PATH, 'data/pithos/db')
66 #BACKEND = ('SimpleBackend', (backend_path, backend_db))
69 backend_module = 'pithos.backends.lib.sqlite'
70 backend_path = os.path.join(PROJECT_PATH, 'data/pithos/')
71 backend_db = os.path.join(PROJECT_PATH, 'data/pithos/db')
72 #backend_module = 'pithos.backends.lib.sqlalchemy'
73 #backend_path = os.path.join(PROJECT_PATH, 'data/pithos/')
74 #backend_db = 'postgresql://user:pass@host/db'
75 BACKEND = ('ModularBackend', (backend_module, backend_path, backend_db))
77 # Shibboleth-enabled path for authentication.
80 BYPASS_ADMIN_AUTH = False
82 # Local time zone for this installation. Choices can be found here:
83 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
84 # although not all choices may be available on all operating systems.
85 # On Unix systems, a value of None will cause Django to use the same
86 # timezone as the operating system.
87 # If running in a Windows environment this must be set to the same as your
91 # Language code for this installation. All choices can be found here:
92 # http://www.i18nguy.com/unicode/language-identifiers.html
93 LANGUAGE_CODE = 'en-us'
97 # If you set this to False, Django will make some optimizations so as not
98 # to load the internationalization machinery.
101 # If you set this to False, Django will not format dates, numbers and
102 # calendars according to the current locale
105 # Absolute filesystem path to the directory that will hold user-uploaded files.
106 # Example: "/home/media/media.lawrence.com/"
109 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
110 # trailing slash if there is a path component (optional in other cases).
111 # Examples: "http://media.lawrence.com", "http://example.com/media/"
114 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
116 # Examples: "http://foo.com/media/", "/media/".
117 ADMIN_MEDIA_PREFIX = '/media/'
119 # Make this unique, and don't share it with anybody.
120 SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si'
122 # List of callables that know how to import templates from various sources.
124 'django.template.loaders.filesystem.Loader',
125 'django.template.loaders.app_directories.Loader',
126 # 'django.template.loaders.eggs.Loader',
129 MIDDLEWARE_CLASSES = (
130 'django.middleware.common.CommonMiddleware',
131 # 'django.contrib.sessions.middleware.SessionMiddleware',
132 # 'django.middleware.csrf.CsrfViewMiddleware',
133 # 'django.contrib.auth.middleware.AuthenticationMiddleware',
134 # 'django.contrib.messages.middleware.MessageMiddleware',
135 'pithos.middleware.LoggingConfigMiddleware',
136 'pithos.middleware.AuthMiddleware'
139 ROOT_URLCONF = 'pithos.urls'
142 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
143 # Always use forward slashes, even on Windows.
144 # Don't forget to use absolute paths, not relative paths.
148 # 'django.contrib.auth',
149 # 'django.contrib.contenttypes',
150 # 'django.contrib.sessions',
151 # 'django.contrib.sites',
152 # 'django.contrib.messages',
153 # 'django.contrib.admin',
154 # 'django.contrib.admindocs',
161 # Set the expiration time of newly created auth tokens
162 # to be this many hours after their creation time.
163 AUTH_TOKEN_DURATION = 30 * 24
165 # Default quota for new users.
166 DEFAULT_QUOTA = 10 * 1024 * 1024 * 1024
168 ADMIN_PAGE_LIMIT = 10