Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.6 kB)

1
#coding=utf8
2
from django.conf import settings
3
from os.path import abspath, dirname, join
4

    
5
PROJECT_PATH = getattr(settings, 'PROJECT_PATH', dirname(dirname(abspath(__file__))))
6

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

    
21
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL', 'http://127.0.0.1:8000/im/authenticate')
22
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', sample_users)
23

    
24
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
25
BACKEND_DB_MODULE = getattr(settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
26
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION', 'sqlite:///' + join(PROJECT_PATH, 'backend.db'))
27

    
28
# Block storage.
29
BACKEND_BLOCK_MODULE = getattr(settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
30
BACKEND_BLOCK_PATH = getattr(settings, 'PITHOS_BACKEND_BLOCK_PATH', join(PROJECT_PATH, 'data/'))
31

    
32
# Queue for billing.
33
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE', None) # Example: 'pithos.backends.lib.rabbitmq'
34
BACKEND_QUEUE_CONNECTION = getattr(settings, 'PITHOS_BACKEND_QUEUE_CONNECTION', None) # Example: 'rabbitmq://guest:guest@localhost:5672/pithos'
35

    
36
# Default setting for new accounts.
37
BACKEND_QUOTA = getattr(settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
38
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
39