#2360: Documentation for app_globals unclear
---------------------------+------------------------------------------------
Reporter: europe72 | Owner: mpedersen
Type: documentation | Status: new
Priority: normal | Milestone:
Component: Documentation | Version: 2.1
Severity: minor | Keywords:
---------------------------+------------------------------------------------
When serving an application via paste/HTTP app_globals appears not to be
available without an import statement such as "from myapp.lib.app_globals
import Globals." And then to access global variables etc. you need
something similar to the following: Globals.foo. This is 1). contradictory
to the inline documentation provided in app_globals.py and 2).
contradictory to how paster shell works; In paster shell there is indeed a
global obj named app_globals. And in shell app_globals.foo works.
Would be nice is app_globals was available right out of the gate and if it
worked as described in in the inline docs (see below copy of docblock from
app_globals.py)
"""Container for objects available throughout the life of the
application.
One instance of Globals is created during application initialization
and
is available during requests via the 'app_globals' variable.
"""
Happy hunting
--
Ticket URL: <http://trac.turbogears.org/ticket/2360>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---