On Wed, Jun 8, 2011 at 7:11 AM, mehdi0016 <[email protected]> wrote: > Hi > How could i add some global attribute to my pyramid application to use > them cross-application or cross-request? > thanks.
For cross-request variables, put them in the 'settings' dict, available as 'settings' in main() and as 'request.registry.settings' in views. By cross-application variables, do you mean across the entire application? If so, the same thing applies. I'm not sure how to access the registry outside a request. If you can't find it in the docs you can try ``pyramid.threadlocal.get_current_request()`` as a last resort. -- Mike Orr <[email protected]> -- 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.
