On Fri, Dec 31, 2010 at 11:21 AM, grassoalvaro <[email protected]> wrote:
> I'm creating a CMS system and the idea is:
>
> main Configurator has route '/some-cms-page/' which is calling
> cms_view method:
>
> == pseudocode ==
> def cms_view(request):
>    page = Page.get_page(request)
>    response = ''
>    for plugin in page.plugins:
>        plugin = init_plugin()
>        view = plugin_conf.get_view_method('current/url/address/')
>        response += view(request)
>    return response
>
> So, plugin MUST have own Configurator. And again my question is that
> Configurator has something similar to method 'get_view_method'?

I suspect you are in the wrong lead with the configurator. AFAIK the
configurator is used only when creating the WSGI app. To change the
'configuration' of the app at run-time I suspect you have to deal with
the application registry and understand ZCA.

http://docs.pylonshq.com/pyramid/dev/narr/zca.html

>
> On 31 Gru, 11:03, Chris McDonough <[email protected]> wrote:
>> On Fri, 2010-12-31 at 01:53 -0800, grassoalvaro wrote:
>> > Ok, i bad described my problem.  In example above with Configurator in
>> > each plugin i want something like:
>>
>> > def my_view(request):
>> >     plugin_conf = init_plugin()
>> >     # plugin_conf is a Configurator
>> >     view = plugin_conf.get_view_method('current/url/address/')
>> >     rendered_plugin = view(request)
>>
>> > Has pyramid in Configurator (can't find it) method like
>> > 'get_view_method' or something similar?
>>
>> If you're trying to configure "plugins", use config.include instead of
>> trying to create some separate configurator that has some other sort
>> of.. something... inside a 
>> view.http://docs.pylonshq.com/pyramid/dev/narr/advconfig.html#including-co...
>>
>> - C
>
> --
> 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.
>
>



-- 
Danny Navarro  |  http://dannynavarro.net

-- 
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