source: TI12-security/branches/ndg-security-1.5.x/ndg_security_test/ndg/security/test/integration/pylonsapp/data/templates/secured.mako.py @ 6871

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/branches/ndg-security-1.5.x/ndg_security_test/ndg/security/test/integration/pylonsapp/data/templates/secured.mako.py@6871
Revision 6871, 1.2 KB checked in by pjkersha, 11 years ago (diff)

1.5.4 Release

Includes Pylons login/logout decorators.

Line 
1from mako import runtime, filters, cache
2UNDEFINED = runtime.UNDEFINED
3__M_dict_builtin = dict
4__M_locals_builtin = locals
5_magic_number = 5
6_modified_time = 1274186467.931278
7_template_filename='/home/pjkersha/workspace/ndg_security_1_5_x/ndg_security_test/ndg/security/test/integration/pylonsapp/pylonsapp/templates/secured.mako'
8_template_uri='/secured.mako'
9_template_cache=cache.Cache(__name__, _modified_time)
10_source_encoding='utf-8'
11from webhelpers.html import escape
12_exports = []
13
14
15def render_body(context,**pageargs):
16    context.caller_stack._push_frame()
17    try:
18        __M_locals = __M_dict_builtin(pageargs=pageargs)
19        request = context.get('request', UNDEFINED)
20        __M_writer = context.writer()
21        # SOURCE LINE 1
22        __M_writer(u'Test NDG Security Login and logout decorators for a Pylons application<br />\n<br />\n')
23        # SOURCE LINE 3
24        if 'REMOTE_USER' in request.environ:
25            # SOURCE LINE 4
26            __M_writer(u'    <a href="/secured/logout">Logout</a>\n')
27            # SOURCE LINE 5
28        else:
29            # SOURCE LINE 6
30            __M_writer(u'    <a href="/secured/login">Login</a>\n')
31        return ''
32    finally:
33        context.caller_stack._pop_frame()
34
35
Note: See TracBrowser for help on using the repository browser.