Hi Ben,

That is interesting approach. So I can get out of using app globals. I
will test and update the RUM community on this.

Can I use decorators for authorization here? I have repoze.who & what
in place.

 RumController = RumApp({
................
...............
})

Thanks,

Krish

On Dec 21, 7:16 am, Ben Bangert <[email protected]> wrote:
> 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.


Reply via email to