cuchulufm/cuchulu/settings/config.py.sample

112 lines
2 KiB
Python

#!/usr/bin/env python3
# You need install cromosoma for use this.
from cuchulu.libraries.db.webmodel import WebModel
from importlib import import_module
# No touch it if you don't know what are you doing
import sys, os
cuchulu_root=os.path.dirname(sys.modules['cuchulu'].__file__)
#####
#Host/IP where bind the server
port=5000
debug=False
reloader=False
admin_folder='/admin'
host='localhost'
allowed_ips=[]
#The theme by default
theme='default'
#Base directory for save modules
#base_modules="modules"
#Type server used for connect to the internet...
# With bottle 0.13 is better use gunicorn
server_used="gunicorn"
#Module showed in index
default_module="welcome"
#Modules with permissions to access for users
#modules=['cuchulu.modules.welcome']
# For apps using own app objects
apps={'welcome': ['cuchulu.modules.welcome', 'welcome_app', '/'], 'lang': ['cuchulu.modules.lang', '', '']}
#The base url
base_url='/'
#Activate sessions?
session_enabled=True
#Variables for beaker sessions
cookie_name = 'cuchulu.session'
domain_url='http://localhost:5000
portal_email='Portal name'
#Keep this variable and don't show to anybody
key_encrypt="im smoking fool"
# Options for use redis for sessions, more scalable.
"""
session_opts = {
'session.path': base_url,
'session.key': cookie_name,
'session.type': 'redis',
'session.host': 'localhost',
'session.port': 6379,
'session.db': 0
}
"""
# Options for use files for sessions
session_opts = {
'session.path': base_url,
'session.key': cookie_name,
'session.type': 'file',
'session.data_dir': './sessions',
'session.auto': False,
'session.secret': key_encrypt,
}
#Can be absolute or relative
media_url='/'
#Use this feature in development, you should change it in production.
yes_static=True
#Database mysql config, if you want anything...
#WebModel.connections={'default': {'name': 'default', 'host': 'localhost', 'user': 'root', 'password': '', 'db': 'example', 'charset': 'utf8mb4', 'set_connection': False} }