equal
deleted
inserted
replaced
99 was not supplied to the ErrorResponse |
99 was not supplied to the ErrorResponse |
100 """ |
100 """ |
101 context = response_helpers.getUniversalContext(request, context=context) |
101 context = response_helpers.getUniversalContext(request, context=context) |
102 |
102 |
103 # make a list of possible "sibling" templates, then append a default |
103 # make a list of possible "sibling" templates, then append a default |
104 error_templates = template_helpers.makeSiblingTemplatesList(template, |
104 error_templates = template_helpers.makeSiblingTemplatesList( |
105 'error.html') |
105 template, 'error.html', default_template=DEF_ERROR_TMPL) |
106 error_templates.append(DEF_ERROR_TMPL) |
|
107 |
106 |
108 context['error_status'] = error.response_args.get('status') |
107 context['error_status'] = error.response_args.get('status') |
109 context['error_message'] = error.message |
108 context['error_message'] = error.message |
110 |
109 |
111 return response_helpers.respond(request, error_templates, context=context, |
110 return response_helpers.respond(request, error_templates, context=context, |
132 to the login template in lieu of using login_message_fmt |
131 to the login template in lieu of using login_message_fmt |
133 """ |
132 """ |
134 context = response_helpers.getUniversalContext(request, context=context) |
133 context = response_helpers.getUniversalContext(request, context=context) |
135 |
134 |
136 # make a list of possible "sibling" templates, then append a default |
135 # make a list of possible "sibling" templates, then append a default |
137 login_templates = template_helpers.makeSiblingTemplatesList(template, |
136 login_templates = template_helpers.makeSiblingTemplatesList( |
138 'login.html') |
137 template, 'login.html', default_template=DEF_LOGIN_TMPL) |
139 login_templates.append(DEF_LOGIN_TMPL) |
|
140 |
138 |
141 if not context.get('login_message'): |
139 if not context.get('login_message'): |
142 if not login_message_fmt: |
140 if not login_message_fmt: |
143 login_message_fmt = DEF_LOGIN_MSG_FMT |
141 login_message_fmt = DEF_LOGIN_MSG_FMT |
144 context['login_message'] = login_message_fmt % context |
142 context['login_message'] = login_message_fmt % context |