gtinfo()

As a convenience for template and content authoring, Gizmo(QP) provides
the gtinfo() template callable. Calling this from within a
a template will display a nicely formatted listing of the currently
executing template namespace, including all site-specific and, if any,
all page-specific customizations.

The sub-namespaces

kw
All keyword arguments passed on the call to page() show up
under this sub-namespace. Cleared and updated per hit.
On globals.

page
Callables that concern the page.
This is initialized when the Gizmo(QP) Directory is initialized,
and is used by all pages of the directory. The two values
page.title and page.content are specially treated,
as they are updated per request.
On locals.

site
This is made up mostly of renderers or utilities that pertain
to the site, provided by the site’s skin.
On globals.

dhi
This is the dhi instance for the
page. Note that this is not necessarily the dhi instance
for the hit. This allows to access page-specific data, as it is
accumulated during a response. Particularly useful is the ability to
access any existing
gizmo object
i.e. via dhi.gizmos.gizmoid.
On globals.

gizmo
The module gz.skin.gizmo,
exposing selected gizmo objects.
On globals.

html
The module gz.skin.html,
exposing various html utilities.
On globals.

hit
This is the current QP Hit instance, thus giving
access to the curent request, response
and session objects.
On globals.

begin.* end.*
Open-ended sub-namespaces.
A template may define as many
begin.indicator and/or end.indicator
as necessary, to delineate
the beginning and/or the end of a template.
Thus marked, a template may be GTi-addressed.
If evaluated, these always evaluate to the empty string.
On globals.

Customizing the evaluation namespace

Site-wide customization is done by adding values or callables
to any of the sub-namespaces that are set via the Evaluator’s globals
dictionary. This is most conveniently done in the __init__()
of a subclass of any of the Skin classes.

Directory-specific customization is done by adding values or callables
to the page sub-namespace — best done by modifying
the directory’s locals dictionary in the directory’s __init__().

Page-specific customization is done by passing arbitrary keyword
arguments to the page() delegator function, that will appear
under the kw sub-namespace.

Calling gtinfo()

To call it, just add the following code to the template:

%(gtinfo())s

That, for this page, produces:

gizmo(qp) template namespace

kw

.site_css : ‘gzweb.css’
.template : None
.template_content : ‘doc_skin.html#gtinfo’
page

.content : u”
.crumbed_menu(offset=0, css_class=’menu’)
.crumbs(root=False)
.menu(css_class=’menu’, css_level=0)
.title : ‘gtinfo()’
.url_path(n=0)
site

.hit_seconds(from_utc=None)
.link_admin(text=’Admin’, css_class=’admin’)
.link_login(text=’Already registered? Please sign in…’, css_class=’login’)
.link_login_logout(intext=’Login’, outtext=None, css_class=’login’)
.link_logout(text=None, css_class=’login’)
.link_register(text=’Not registered? Please register…’, css_class=’register’)
.link_register_login_logout(regtext=’Not registered? Please register…’, intext=’Already registered? Please sign in…’, outtext=None, css_class=’register’)
.pull(gti, basekey=None, eval=True)
.url_path_for(basekey, filename=None)
.userid()
dhi

.body_attrs

.css_codes : []
.css_files : [{

‘media’ : ‘print’,
‘src’ : ‘print.css’,

}]

.gizmos

.scl : <gz.gizmo.scrambling_links.ScramblingLinks object at 0x85f704c>
.http_equiv : None
.js_codes : [u”var scl = new jvScrambler(‘scl’,’scl_scramble’,’manageable web user interfaces’);”]
.js_files : [‘/gza/global.js’]
.meta : None
.onload_actions : []
.x

.allow : None
.attribute : ‘gtinfo’
.component : ‘gtinfo’
.crumb : ‘gtinfo()’
.dhi : None
.slashed : False
.title : ‘gtinfo()’
gizmo

.Collapsable(gizmoid, dhi=None, css_codes=None, onload_actions=None, js_codes=None, contents=None, title=”, status=”, icon_expand=None, icon_collapse=None)
.Form(gizmoid, dhi=None, css_codes=None, onload_actions=None, js_codes=None, check_evt=None, method=’post’, action=None, enctype=None, use_tokens=True, prefix=None, accept_charset=’UTF-8′)
.ScramblingLinks(gizmoid, dhi=None, css_codes=None, onload_actions=None, js_codes=None, base_phrase=None, links=None)
.Stbl(gizmoid, dhi=None, css_codes=None, onload_actions=None, js_codes=None, col_types=None, sort_on=0, sort_sense=’desc’, rows_css_classes=None, css_class=’stbl’, width=None, status=True, status_first=’status first’, status_runin=’status runin’, status_main=’status main’, first_spans=1, columns=None, column_css_classes=None, column_widths=None, column_fcodes=None, rows_data=None, footer_data=None)
.Suckerfish(gizmoid, dhi=None, css_codes=None, onload_actions=None, js_codes=None, menus=None, offset=0, offset_to=None)
.Tabbed(gizmoid, dhi=None, css_codes=None, onload_actions=None, js_codes=None, sections=None, visible=None)
html

.div(*args)
.dl(tuples)
.email_address(email)
.format_p_obj(value, recurse_p_attrs=0, link_p_attrs=False)
.h8 : <type ‘qpy.c8.h8’>
.href(url, text, title=None)
.htmltag(tag, xml_end=False, css_class=None)
.hyperblurb(component, label, text, **kw)
.img(src)
.link_gizmo(text=’Gizmo(QP)’)
.mailto(email, text=None)
.nl2br(v)
.ol(items)
.p(*args)
.pformat(object, indent=1, width=80, depth=None)
.ul(items)
.url_query()
.urlq(s, safe=’/’)
hit : <qp.pub.hit.Hit object at 0x86009ac>
begin.*
end.*
gtinfo()