summaryrefslogtreecommitdiffstats
path: root/manas/config/app_cfg.py
blob: 3f9da94b7e57812835f39f9a88e58b8f772b88e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from tg.config import AppConfig, Bunch
from tg.environment import make_load_environment
import manas
from manas import model
from manas.lib import app_globals, helpers

base_config = AppConfig()
base_config.renderers = []

base_config.package = manas

#Set the default renderer
base_config.default_renderer = 'genshi'
base_config.renderers.append('genshi') 

#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = manas.model
#Configure the authentication backend
base_config.auth_backend = 'sqlalchemy'
base_config.sa_auth = Bunch()
base_config.sa_auth.dbsession = model.DBSession
base_config.sa_auth.user = model.User
base_config.sa_auth.user_criterion = model.User.user_name
base_config.sa_auth.user_id_column = 'user_id'