Revision 4a669c71

b/docs/source/conf.py
16 16
# If extensions (or modules to document with autodoc) are in another directory,
17 17
# add these directories to sys.path here. If the directory is relative to the
18 18
# documentation root, use os.path.abspath to make it absolute, like shown here.
19
sys.path.insert(0, os.path.abspath('..'))
19
sys.path.insert(0, os.path.abspath('../..'))
20 20

  
21
from pithos import settings
21
from synnefo import settings
22 22
from django.core.management import setup_environ
23 23
setup_environ(settings)
24 24

  
b/snf-pithos-app/pithos/api/synnefo_settings.py
1
#coding=utf8
2
# Django settings for pithos project.
3

  
4
from os.path import abspath, dirname, exists, join
5

  
6
PROJECT_PATH = dirname(abspath(__file__))
7

  
8
DEBUG = True
9
TEMPLATE_DEBUG = DEBUG
10

  
11
ADMINS = (
12
    # ('Your Name', 'your_email@domain.com'),
13
)
14

  
15
MANAGERS = ADMINS
16

  
17
DATABASES = {
18
    'default': {
19
        'ENGINE': 'django.db.backends.sqlite3',
20
        'NAME': join(PROJECT_PATH, 'pithos.db')
21
    }
22
}
23

  
24
# Local time zone for this installation. Choices can be found here:
25
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26
# although not all choices may be available on all operating systems.
27
# If running in a Windows environment this must be set to the same as your
28
# system time zone.
29
TIME_ZONE = 'UTC'
30

  
31
# Language code for this installation. All choices can be found here:
32
# http://www.i18nguy.com/unicode/language-identifiers.html
33
LANGUAGE_CODE = 'en-us'
34

  
35
SITE_ID = 1
36

  
37
# If you set this to False, Django will make some optimizations so as not
38
# to load the internationalization machinery.
39
USE_I18N = True
40

  
41
# If you set this to False, Django will not format dates, numbers and
42
# calendars according to the current locale
43
USE_L10N = True
44

  
45
# Absolute path to the directory that holds media.
46
# Example: "/home/media/media.lawrence.com/"
47
MEDIA_ROOT = ''
48

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

  
54
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
55
# trailing slash.
56
# Examples: "http://foo.com/media/", "/media/".
57
ADMIN_MEDIA_PREFIX = '/media/'
58

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

  
62
# List of callables that know how to import templates from various sources.
63
TEMPLATE_LOADERS = (
64
    'django.template.loaders.filesystem.Loader',
65
    'django.template.loaders.app_directories.Loader',
66
)
67

  
68
MIDDLEWARE_CLASSES = (
69
    'django.middleware.common.CommonMiddleware',
70
    #'django.middleware.csrf.CsrfViewMiddleware',
71
    #'django.contrib.sessions.middleware.SessionMiddleware',
72
    #'django.contrib.auth.middleware.AuthenticationMiddleware',
73
    #'django.contrib.messages.middleware.MessageMiddleware',
74
    'pithos.middleware.LoggingConfigMiddleware',
75
    'pithos.middleware.SecureMiddleware'
76
)
77

  
78
ROOT_URLCONF = 'pithos.urls'
79

  
80
TEMPLATE_DIRS = (
81
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
82
    # Always use forward slashes, even on Windows.
83
    # Don't forget to use absolute paths, not relative paths.
84
)
85

  
86 1
# Setup logging (use this name for the setting to avoid conflicts with django > 1.2.x).
87 2
LOGGING_SETUP = {
88 3
    'version': 1,
......
111 26
    'loggers': {
112 27
        'pithos': {
113 28
            'handlers': ['console'],
114
            'level': 'DEBUG' if DEBUG else 'INFO'
29
            'level': 'INFO'
115 30
        },
116 31
    }
117 32
}
118 33

  
119
# The server is behind a proxy (apache and gunicorn setup).
120
USE_X_FORWARDED_HOST = False
121

  
122
# Set umask (needed for gunicorn setup).
123
#umask(0077)
124

  
125
conf = join(PROJECT_PATH, 'settings.local')
126
if exists(conf):
127
    execfile(conf)
128
elif exists('/etc/pithos/settings.local'):
129
    execfile('/etc/pithos/settings.local')
130

  
131
INSTALLED_APPS = (
132
    'pithos.api',
133
)
b/snf-pithos-app/pithos/synnefo_settings.py
4 4

  
5 5
from django.conf.urls.defaults import include, patterns
6 6

  
7
synnefo_installed_apps = ['pithos.ui', 'pithos.api']
7
synnefo_installed_apps = ['pithos.api']
8 8
synnefo_urls = patterns('',
9 9
    (r'', include('pithos.urls')),
10 10
)
11 11
synnefo_middlewares = [
12 12
    'pithos.middleware.LoggingConfigMiddleware',
13
    'pithos.middleware.SecureMiddleware',
14
    'pithos.middleware.UserMiddleware'
13
    'pithos.middleware.SecureMiddleware'
15 14
]
16 15

  
17
from pithos.api.settings import *
18
from pithos.ui.settings import *
16
from pithos.api.synnefo_settings import *
/dev/null
1
FEEDBACK_FROM_EMAIL = 'Pithos <no-reply@grnet.gr>'
2
FEEDBACK_CONTACT_EMAIL = 'support@pithos.grnet.gr'
/dev/null
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
from django.conf.urls.defaults import *
35

  
36
urlpatterns = patterns('pithos.ui.views',
37
    (r'^/feedback$', 'send_feedback'),
38
)
/dev/null
1
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
2
from os.path import join
3

  
4
BACKEND_PATH = '/srv/pithos'
5
BACKEND_DB_MODULE = 'pithos.backends.lib.sqlalchemy'
6

  
7
BACKEND_DB_CONNECTION = 'sqlite:////' + BACKEND_PATH + '/pithos-backend.db'
8

  
9
# Block storage.
10
BACKEND_BLOCK_MODULE = 'pithos.backends.lib.hashfiler'
11
BACKEND_BLOCK_PATH = join(BACKEND_PATH, 'data/')
12

  
13
# Default setting for new accounts.
14
BACKEND_QUOTA = 50 * 1024 * 1024 * 1024
15
BACKEND_VERSIONING = 'auto'
b/snf-pithos-backend/setup.py
198 198
    entry_points = {
199 199
     'console_scripts': [
200 200
         ],
201
     'synnefo': [
202
         'default_settings = pithos.backends.settings',
203
         ]
204 201
      },
205 202
)
206 203

  

Also available in: Unified diff