Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / pithos / api / settings.py @ 4a669c71

History | View | Annotate | Download (1.6 kB)

1 cf441bae Antony Chazapis
#coding=utf8
2 a7dff008 Antony Chazapis
from django.conf import settings
3 a7dff008 Antony Chazapis
from os.path import abspath, dirname, join
4 a7dff008 Antony Chazapis
5 a7dff008 Antony Chazapis
PROJECT_PATH = getattr(settings, 'PROJECT_PATH', dirname(dirname(abspath(__file__))))
6 a7dff008 Antony Chazapis
7 cf441bae Antony Chazapis
# Set local users, or a remote host. To disable local users set them to None.
8 cf441bae Antony Chazapis
sample_users = {
9 cf441bae Antony Chazapis
    '0000': 'test',
10 cf441bae Antony Chazapis
    '0001': 'verigak',
11 cf441bae Antony Chazapis
    '0002': 'chazapis',
12 cf441bae Antony Chazapis
    '0003': 'gtsouk',
13 cf441bae Antony Chazapis
    '0004': 'papagian',
14 cf441bae Antony Chazapis
    '0005': 'louridas',
15 cf441bae Antony Chazapis
    '0006': 'chstath',
16 cf441bae Antony Chazapis
    '0007': 'pkanavos',
17 cf441bae Antony Chazapis
    '0008': 'mvasilak',
18 cf441bae Antony Chazapis
    '0009': 'διογένης'
19 cf441bae Antony Chazapis
}
20 cf441bae Antony Chazapis
21 cf441bae Antony Chazapis
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL', 'http://127.0.0.1:8000/im/authenticate')
22 cf441bae Antony Chazapis
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', sample_users)
23 cf441bae Antony Chazapis
24 a7dff008 Antony Chazapis
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
25 18d8fb23 Antony Chazapis
BACKEND_DB_MODULE = getattr(settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
26 a7dff008 Antony Chazapis
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION', 'sqlite:///' + join(PROJECT_PATH, 'backend.db'))
27 a7dff008 Antony Chazapis
28 a7dff008 Antony Chazapis
# Block storage.
29 a7dff008 Antony Chazapis
BACKEND_BLOCK_MODULE = getattr(settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
30 a7dff008 Antony Chazapis
BACKEND_BLOCK_PATH = getattr(settings, 'PITHOS_BACKEND_BLOCK_PATH', join(PROJECT_PATH, 'data/'))
31 a7dff008 Antony Chazapis
32 a7dff008 Antony Chazapis
# Queue for billing.
33 a7dff008 Antony Chazapis
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE', None) # Example: 'pithos.backends.lib.rabbitmq'
34 a7dff008 Antony Chazapis
BACKEND_QUEUE_CONNECTION = getattr(settings, 'PITHOS_BACKEND_QUEUE_CONNECTION', None) # Example: 'rabbitmq://guest:guest@localhost:5672/pithos'
35 a7dff008 Antony Chazapis
36 a7dff008 Antony Chazapis
# Default setting for new accounts.
37 a7dff008 Antony Chazapis
BACKEND_QUOTA = getattr(settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
38 a7dff008 Antony Chazapis
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')