source: TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/pylonsapp/data/templates/secured.mako.py @ 7077

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/pylonsapp/data/templates/secured.mako.py@7077
Revision 7077, 1.3 KB checked in by pjkersha, 11 years ago (diff)
  • Property svn:keywords set to Id
Line 
1# -*- encoding:utf-8 -*-
2from mako import runtime, filters, cache
3UNDEFINED = runtime.UNDEFINED
4__M_dict_builtin = dict
5__M_locals_builtin = locals
6_magic_number = 5
7_modified_time = 1274174083.397857
8_template_filename='/home/pjkersha/workspace/ndg_security_python/ndg_security_test/ndg/security/test/integration/pylonsapp/pylonsapp/templates/secured.mako'
9_template_uri='/secured.mako'
10_template_cache=cache.Cache(__name__, _modified_time)
11_source_encoding='utf-8'
12from webhelpers.html import escape
13_exports = []
14
15
16def render_body(context,**pageargs):
17    context.caller_stack._push_frame()
18    try:
19        __M_locals = __M_dict_builtin(pageargs=pageargs)
20        request = context.get('request', UNDEFINED)
21        __M_writer = context.writer()
22        # SOURCE LINE 1
23        __M_writer(u'Test NDG Security Login and logout decorators for a Pylons application<br />\n<br />\n')
24        # SOURCE LINE 3
25        if 'REMOTE_USER' in request.environ:
26            # SOURCE LINE 4
27            __M_writer(u'    <a href="/secured/logout">Logout</a>\n')
28            # SOURCE LINE 5
29        else:
30            # SOURCE LINE 6
31            __M_writer(u'    <a href="/secured/login">Login</a>\n')
32            pass
33        # SOURCE LINE 8
34        __M_writer(u'\n')
35        return ''
36    finally:
37        context.caller_stack._pop_frame()
38
39
Note: See TracBrowser for help on using the repository browser.