vigigraph / vigigraph / config / app_cfg.py @ 4964dc96
History | View | Annotate | Download (2.52 KB)
1 |
# -*- coding: utf-8 -*-
|
---|---|
2 |
# vim: set fileencoding=utf-8 sw=4 ts=4 et :
|
3 |
"""
|
4 |
Global configuration file for TG2-specific settings in vigigraph.
|
5 |
|
6 |
This file complements development/deployment.ini.
|
7 |
|
8 |
Please note that **all the argument values are strings**. If you want to
|
9 |
convert them into boolean, for example, you should use the
|
10 |
:func:`paste.deploy.converters.asbool` function, as in::
|
11 |
|
12 |
from paste.deploy.converters import asbool
|
13 |
setting = asbool(global_conf.get('the_setting'))
|
14 |
|
15 |
"""
|
16 |
|
17 |
from vigilo import models |
18 |
|
19 |
import vigigraph |
20 |
from vigilo.turbogears import VigiloAppConfig |
21 |
from vigigraph.lib import app_globals, helpers |
22 |
|
23 |
base_config = VigiloAppConfig('vigigraph')
|
24 |
base_config.renderers = [] |
25 |
|
26 |
# XXX semble requis pour le déploiement sur Apache.
|
27 |
# Il faudrait comprendre pourquoi (je soupçonne une dépendance de Rum).
|
28 |
base_config.use_toscawidgets = True
|
29 |
|
30 |
base_config.package = vigigraph |
31 |
|
32 |
#Set the default renderer
|
33 |
base_config.default_renderer = 'genshi'
|
34 |
base_config.renderers.append('genshi')
|
35 |
# if you want raw speed and have installed chameleon.genshi
|
36 |
# you should try to use this renderer instead.
|
37 |
# warning: for the moment chameleon does not handle i18n translations
|
38 |
#base_config.renderers.append('chameleon_genshi')
|
39 |
|
40 |
#Configure the base SQLALchemy Setup
|
41 |
base_config.use_sqlalchemy = True
|
42 |
base_config.model = models |
43 |
|
44 |
# Configure the authentication backend
|
45 |
base_config.auth_backend = 'sqlalchemy'
|
46 |
|
47 |
# what is the class you want to use to search for users in the database
|
48 |
base_config.sa_auth.user_class = models.User |
49 |
# what is the class you want to use to search for groups in the database
|
50 |
base_config.sa_auth.group_class = models.UserGroup |
51 |
# what is the class you want to use to search for permissions in the database
|
52 |
base_config.sa_auth.permission_class = models.Permission |
53 |
# The name "groups" is already used for groups of hosts.
|
54 |
# We use "usergroups" when referering to users to avoid confusion.
|
55 |
base_config.sa_auth.translations.groups = 'usergroups'
|
56 |
|
57 |
# override this if you would like to provide a different who plugin for
|
58 |
# managing login and logout of your application
|
59 |
base_config.sa_auth.form_plugin = None
|
60 |
|
61 |
# You may optionally define a page where you want users to be redirected to
|
62 |
# on login:
|
63 |
base_config.sa_auth.post_login_url = '/post_login'
|
64 |
|
65 |
# You may optionally define a page where you want users to be redirected to
|
66 |
# on logout:
|
67 |
base_config.sa_auth.post_logout_url = '/post_logout'
|
68 |
|
69 |
|
70 |
##################################
|
71 |
# Settings specific to Vigigraph #
|
72 |
##################################
|
73 |
|
74 |
# Vigigraph version
|
75 |
base_config['vigigraph_version'] = u'0.1' |
76 |
|