To be clear, it was straightforward in pylons if you managed to avoid
importing any of that code until after the app was initialized. We have a
cookbook recipe already for emulating a django-style settings.py which you
can freely modify for your needs if you wish. There are obvious reasons for
avoiding this type of code in Pyramid's core, so at this point you're just
asking for ways to deal with this in Python.

On Mon, Mar 26, 2012 at 12:48 PM, Jonathan Vanasco <[email protected]>wrote:

> those work at runtime , but I'm trying to define something on the app
> init
>
> e.g.
>
> lib/constants.py
> ========================
> if PRODUCTION_MACHINE :
>    VAR_1 = '123'
>    VAR_2 = '123'
> elif DEV_MACHINE :
>    VAR_1 = '456'
>    VAR_2 = '456'
> ========================
>
> this is, of course, an illustrative example.  this sort of stuff was
> straightforward in Pylons.
>
> --
> 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.
>
>

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