[Paste] Re: using appconfig() without a WSGI context

Top Page
Author: Alec Flett
Date:  
To: Alec Flett
CC: Paste Users
Subject: [Paste] Re: using appconfig() without a WSGI context

Nevermind, this turned out to be user error.

My problem was that I was using a config like:
[pipeline:main]
pipeline=egg:me#std
          root

[composite:root]
use=egg:Paste#urlmap
/ = client
/api = me

so when I asked for appconfig I was just getting the appconfig for
[pipeline:main] which was more or less empty.

When I asked for appconfig(..., 'client') I got client's configuration.

Alec

On Apr 1, 2009, at 10:33 AM, Alec Flett wrote:

>
> I've come to really like Paste's appconfig system, because I can
> create a sort of cascading configuration (i.e. test.ini which
> overrides some defaults and then imports another config file)
>
> I'd like to use this outside of a WSGI context - i.e. I'd like to just
> say:
>
>>>> from paste.deploy import appconfig
>>>> config = appconfig("../myconfig.ini")
>
> but I'm finding that the only values in 'config' are stuff from the
> [DEFAULT] section, and for the life of me I can't figure out how to
> get a unified config dictionary.
>
> Has anyone successfully loaded a config without creating a WSGI app
> and making a request to it?
>
> Alec
>
> >



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste-users@???
To unsubscribe from this group, send email to paste-users+unsubscribe@???
For more options, visit this group at http://groups.google.com/group/paste-users?hl=en
-~----------~----~----~----~------~----~------~--~---