[973dd91] | 1 | from tg.configuration import AppConfig, Bunch |
---|
| 2 | import sipbmp3web |
---|
| 3 | from sipbmp3web import model |
---|
| 4 | from sipbmp3web.lib import app_globals, helpers |
---|
| 5 | |
---|
| 6 | base_config = AppConfig() |
---|
| 7 | base_config.renderers = [] |
---|
| 8 | |
---|
| 9 | base_config.package = sipbmp3web |
---|
| 10 | |
---|
| 11 | #Set the default renderer |
---|
| 12 | base_config.default_renderer = 'genshi' |
---|
| 13 | base_config.renderers.append('genshi') |
---|
| 14 | # if you want raw speed and have installed chameleon.genshi |
---|
| 15 | # you should try to use this renderer instead. |
---|
| 16 | # warning: for the moment chameleon does not handle i18n translations |
---|
| 17 | #base_config.renderers.append('chameleon_genshi') |
---|
| 18 | |
---|
| 19 | #Configure the base SQLALchemy Setup |
---|
| 20 | base_config.use_sqlalchemy = True |
---|
| 21 | base_config.model = sipbmp3web.model |
---|
| 22 | base_config.DBSession = sipbmp3web.model.DBSession |
---|
| 23 | |
---|
| 24 | # Configure the authentication backend |
---|
| 25 | base_config.auth_backend = 'sqlalchemy' |
---|
| 26 | base_config.sa_auth.dbsession = model.DBSession |
---|
| 27 | # what is the class you want to use to search for users in the database |
---|
| 28 | base_config.sa_auth.user_class = model.User |
---|
| 29 | # what is the class you want to use to search for groups in the database |
---|
| 30 | base_config.sa_auth.group_class = model.Group |
---|
| 31 | # what is the class you want to use to search for permissions in the database |
---|
| 32 | base_config.sa_auth.permission_class = model.Permission |
---|
| 33 | |
---|
[a32b33d] | 34 | base_config.sa_auth.cookie_secret = "thisistotallysecretyo" |
---|
| 35 | |
---|
[973dd91] | 36 | # override this if you would like to provide a different who plugin for |
---|
| 37 | # managing login and logout of your application |
---|
| 38 | base_config.sa_auth.form_plugin = None |
---|
| 39 | |
---|
| 40 | # You may optionally define a page where you want users to be redirected to |
---|
| 41 | # on login: |
---|
| 42 | base_config.sa_auth.post_login_url = '/post_login' |
---|
| 43 | |
---|
| 44 | # You may optionally define a page where you want users to be redirected to |
---|
| 45 | # on logout: |
---|
| 46 | base_config.sa_auth.post_logout_url = '/post_logout' |
---|