settings.py 1.95 KB
Newer Older
1
#coding=utf8
Antony Chazapis's avatar
Antony Chazapis committed
2 3
from django.conf import settings

4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Set local users, or a remote host. To disable local users set them to None.
sample_users = {
    '0000': 'test',
    '0001': 'verigak',
    '0002': 'chazapis',
    '0003': 'gtsouk',
    '0004': 'papagian',
    '0005': 'louridas',
    '0006': 'chstath',
    '0007': 'pkanavos',
    '0008': 'mvasilak',
    '0009': 'διογένης'
}

18 19
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL',
                             'http://127.0.0.1:8000/im/authenticate')
20
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', {})
21

22 23
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')

Antony Chazapis's avatar
Antony Chazapis committed
24
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
25 26 27 28
BACKEND_DB_MODULE = getattr(
    settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION',
                                'sqlite:////tmp/pithos-backend.db')
Antony Chazapis's avatar
Antony Chazapis committed
29 30

# Block storage.
31 32 33 34
BACKEND_BLOCK_MODULE = getattr(
    settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
BACKEND_BLOCK_PATH = getattr(
    settings, 'PITHOS_BACKEND_BLOCK_PATH', '/tmp/pithos-data/')
35
BACKEND_BLOCK_UMASK = getattr(settings, 'PITHOS_BACKEND_BLOCK_UMASK', 0o022)
Antony Chazapis's avatar
Antony Chazapis committed
36 37

# Queue for billing.
38 39 40
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE',
                               None)  # Example: 'pithos.backends.lib.rabbitmq'
BACKEND_QUEUE_CONNECTION = getattr(settings, 'PITHOS_BACKEND_QUEUE_CONNECTION', None)  # Example: 'rabbitmq://guest:guest@localhost:5672/pithos'
Antony Chazapis's avatar
Antony Chazapis committed
41 42

# Default setting for new accounts.
43 44
BACKEND_QUOTA = getattr(
    settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
Antony Chazapis's avatar
Antony Chazapis committed
45 46
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')

47 48 49
# Update object checksums when using hashmaps.
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)

50
# Service Token acquired by identity provider.
51
SERVICE_TOKEN = getattr(settings, 'PITHOS_SERVICE_TOKEN', '')