See context here: https://django-ratelimit.readthedocs.io/en/latest/cookbook/429.html#context For now we continue to fall back to django's default 403 handler for 403 but provide a new 429 template that we use for ratelimit exceptions. This commit also updates a logistration test that relied on the old 403 behavior of django-ratelimit instead of the newly added 429 behavior.
27 lines
819 B
HTML
27 lines
819 B
HTML
<%page expression_filter="h"/>
|
|
<%namespace name='static' file='../static_content.html'/>
|
|
<%!
|
|
from django.utils.translation import ugettext as _
|
|
from openedx.core.djangolib.markup import HTML, Text
|
|
%>
|
|
<%inherit file="../main.html" />
|
|
|
|
<%block name="pagetitle">${_("Too Many Requests")}</%block>
|
|
|
|
<main id="main" aria-label="Content" tabindex="-1">
|
|
<section class="outside-app">
|
|
<h1>
|
|
<%block name="pageheader">${page_header or _("Too Many Requests")}</%block>
|
|
</h1>
|
|
<p>
|
|
<%block name="pagecontent">
|
|
% if page_content:
|
|
${page_content}
|
|
% else:
|
|
${Text(_('Your request has been rate-limited. Please try again later.'))}
|
|
% endif
|
|
</%block>
|
|
</p>
|
|
</section>
|
|
</main>
|