I think this is a good thing to think about. My specific use case involves using XML files as my model and using XSLT primarily for creating actual pages. There are times when an XML file could be served directly with a processing instruction to the XSLT. In which case I would want to keep the files in the public directory.

I am sure I am missing something such as a way to make some other directories "public" and point a route at the directory. I just mention this example because my initial thought was to add something in my config that would be accessible easily and used in almost every request for using a public directory as a resource.

Eric

On 11/14/06, Sergey Lipnevich <[EMAIL PROTECTED]> wrote:
Maybe "g" could keep the whole configuration image and allow modules
to query it as they please. I would still somehow try to avoid any
excessive parsing and validation of configuration options. A module
could access configuration once, figure out parameters, put them back
into "g" parsed and ready, and then use on subsequent requests.

Sergey.

On 11/14/06, Robert < [EMAIL PROTECTED]> wrote:
>
> That's awkward when you have a lot of config data. You'd have to
> manually copy it all somewhere (app_globals) into Globals, which is
> essentially boilerplate code. The right thing to do would be, as OP
> requested, to let every module access easily and consistently the part
> of configuration this module cares about - no clutter and fat that way.
>
> Sergey Lipnevich napisaƂ(a):
> > I think the "pattern" that's being encourages is to only access
> > configuration once in app_globals.py, that's why Globals.__init__ gets
> > a reference to it. Anything you need later must become Globals member
> > variables accessible everywhere via "g" proxy.
--~--~---------~--~----~------------~-------~--~----~
 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