-
Notifications
You must be signed in to change notification settings - Fork 438
/
Copy pathlogin.mako.py
75 lines (65 loc) · 2.7 KB
/
login.mako.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from mako import cache
from mako import runtime
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 6
_modified_time = 1367126126.936375
_template_filename = "htdocs/login.mako"
_template_uri = "login.mako"
_template_cache = cache.Cache(__name__, _modified_time)
_source_encoding = "utf-8"
_exports = []
def _mako_get_namespace(context, name):
try:
return context.namespaces[(__name__, name)]
except KeyError:
_mako_generate_namespaces(context)
return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
pass
def _mako_inherit(template, context):
_mako_generate_namespaces(context)
return runtime._inherit_from(context, "root.mako", _template_uri)
def render_body(context, **pageargs):
context.caller_stack._push_frame()
try:
__M_locals = __M_dict_builtin(pageargs=pageargs)
redirect_uri = context.get("redirect_uri", UNDEFINED)
key = context.get("key", UNDEFINED)
action = context.get("action", UNDEFINED)
authn_reference = context.get("authn_reference", UNDEFINED)
login = context.get("login", UNDEFINED)
password = context.get("password", UNDEFINED)
__M_writer = context.writer()
# SOURCE LINE 1
__M_writer(
'\n\n<h1>Please log in</h1>\n<p class="description">\n To register it\'s quite simple: enter a login and a password\n</p>\n\n<form action="'
)
# SOURCE LINE 8
__M_writer(unicode(action))
__M_writer('" method="post">\n <input type="hidden" name="key" value="')
# SOURCE LINE 9
__M_writer(unicode(key))
__M_writer('"/>\n <input type="hidden" name="authn_reference" value="')
# SOURCE LINE 10
__M_writer(unicode(authn_reference))
__M_writer('"/>\n <input type="hidden" name="redirect_uri" value="')
# SOURCE LINE 11
__M_writer(unicode(redirect_uri))
__M_writer(
'"/>\n\n <div class="label">\n <label for="login">Username</label>\n </div>\n <div>\n <input type="text" name="login" value="'
)
# SOURCE LINE 17
__M_writer(unicode(login))
__M_writer(
'"/><br/>\n </div>\n\n <div class="label">\n <label for="password">Password</label>\n </div>\n <div>\n <input type="password" name="password"\n value="'
)
# SOURCE LINE 25
__M_writer(unicode(password))
__M_writer(
'"/>\n </div>\n\n <input class="submit" type="submit" name="form.submitted" value="Log In"/>\n</form>\n'
)
return ""
finally:
context.caller_stack._pop_frame()