inside app_cfg the development.ini has not yet been loaded, that is
the reason why you don't have the options you specified inside your
app_cfg.
As Configuration files are meant to replace the options inside the
app_cfg they are loaded after the app_cfg.

A possible solution is to load the plugins list from an .ini file
inside the app_cfg.py file and then load them.
The actual ini file can also be the development.ini itself.

PS: The current tgext.pluggable has a minor issue with TG2.2 which
might cause some controller methods to not be registered. It will be
fixed with a new pluggable release during this week. In the mean time
if you see that some methods of the controllers you are plugging are
missing you can set tg.config['renderers'] = base_config.renderers
inside the app_cfg before loading the pluggables themselves.

On Tue, Sep 4, 2012 at 11:40 AM, Luca Verardi <[email protected]> wrote:
> Hello everybody,
> I am using TG 2.2.0 and tgext.pluggable 0.0.8
> I would like to load some plugins listed in my development.ini. I tried
> this:
>
> development.ini
>
> [app:main]
> ...
> ...
> plugins= plugin1, plugin2
>
> app_cfg.py:
>
> from tg import config
> from tgext.pluggable import plug
> for plugin in config.get('plugins').split(','):
>     plug(base_config, plugin)
>
> TG2 returns this error  AttributeError: 'NoneType' object has no attribute
> 'split'.
>
> Thanks for your support
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/onmsc6yAKgkJ.
> 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/turbogears?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to