setting.py 1.56 KB
Newer Older
wanli's avatar
wanli committed
1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/env python
# -*- coding: utf_8 -*-

import os
import configparser

conf = configparser.ConfigParser()
conf.read(os.path.join(os.getcwd(), "config.ini"))

config = dict(
    NAME='evm_store',
wanli's avatar
wanli committed
12
    DEBUG=False,
wanli's avatar
wanli committed
13 14
    HOST=conf.get('application', 'host'),
    PORT=int(conf.get('application', 'port')),
wanli's avatar
wanli committed
15
    LOGIN_DISABLED=False,
wanli's avatar
wanli committed
16 17
    MD5_SALT="EhuqUkwV",
    SECRET_KEY='secret_key_EhuqUkwV',
wanli's avatar
wanli committed
18
    DATABASE=conf.get('database', 'filename'),
wanliofficial's avatar
wanliofficial committed
19
    DATABASE_FILE=conf.get('scheduler', 'db'),
wanli's avatar
wanli committed
20 21 22 23 24
    PONY={
        'provider': conf.get('database', 'provider'),
        'filename': "../{}".format(conf.get('database', 'filename')),
        'create_db': True,
    },
wanli's avatar
wanli committed
25
    TABLE_PREFIX='evm_store_',
wanli's avatar
wanli committed
26
    BACKUP_DIR=conf.get('application', 'backup_dir'),
wanli's avatar
wanli committed
27
    UPLOAD_SERVER="{}://{}:{}/".format(conf.get('uploads', 'protocol'), conf.get('uploads', 'host'), conf.get('uploads', 'port')),
wanli's avatar
wanli committed
28 29 30
    EPK_DIR=conf.get('uploads', 'epk_dir'),
    TEMP_DIR=conf.get('uploads', 'temp_dir'),
    UPLOAD_PATH=os.path.abspath(conf.get('uploads', 'upload_path')),
wanli's avatar
wanli committed
31 32 33 34 35 36 37 38 39 40 41 42 43
    UPLOAD_DIR=conf.get('uploads', 'upload_dir'),
    TEMPLATE_PATH=os.path.join(os.getcwd(), "static"),
    STATIC_PATH=os.path.join(os.getcwd(), "static"),
    LOGO=r'''
               ______                               _____              
___      _________  /_     ________________________ __  /______________
__ | /| / /  _ \_  __ \    _  ___/_  ___/  _ \  __ `/  __/  __ \_  ___/
__ |/ |/ //  __/  /_/ /    / /__ _  /   /  __/ /_/ // /_ / /_/ /  /    
____/|__/ \___//_.___/     \___/ /_/    \___/\__,_/ \__/ \____//_/   

Power by EVM Team
    '''
)