On Dec 20, 2009, at 5:49 PM, [email protected] wrote:
> I use app_globlas to create and store the RUM based wsgi application.
Odd, I used RUM in an app, it's easier than that actually.
Make your RumApp instance inside a controller (say, called rum.py). If you make
it inside of 'rum.py' then name the instantiated app instance RumController.
Ie. do your:
RumController = RumApp({
'debug': asbool(config.get('debug')),
'full_stack': True,
'rum.repositoryfactory': {
'use': 'sqlalchemy',
'session_factory': sf.model.meta.Session,
'models': [
sf.model.Page, sf.model.PageItem,
sf.model.AdminPanel, sf.model.AdminTask
]
},
'rum.viewfactory': {
'use': 'toscawidgets',
},
'rum.translator': {
'use': 'default',
'locales': ['es', 'en'],
}
})
Then setup a route to go to it:
map.connect('/rum/*path_info', controller='rum')
That should be it. This utilizes the fact that all Pylons controllers are
technically WSGI app callable, so as long as you follow the naming convention,
it doesn't *have* to be a Pylons WSGIController (note this is what you inherit
from in your lib/base.py), it can be *any* WSGI app.
Cheers,
Ben
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.