i took an awkward approach to this that I like rather well...

1- I created a middleware layer which makes a new SOP
'open_social_network' out of 'from pylons.util import
AttribSafeContextObj'
2- On app startup, i populate a globals hash with the config values
3- My basecontrollers all derive from a std class that handles auth,
and the __before__ there sticks the open_social_network SOP into c as
c.osn

its a couple of extra steps, but now i can just references everything
i need as c.osn.foo , c.osn.bar -- everything is nice in its own
namespace and all.

i even made two extra SOPs...

c.osn_sweet - show a value from c.osn if its there, c if its not
c.osn_savvy - show a value from c if its there, c.osn if its not

i can post the relevant files if needed
--~--~---------~--~----~------------~-------~--~----~
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