~sirn/fanboi2

c2bb68746e1a7e9c0605425bc23cf7e00c476f4f — Kridsada Thanabulpong 6 years ago 7f6bba4
Rename errors.mako into rate_limited.mako.
4 files changed, 4 insertions(+), 4 deletions(-)

R fanboi2/templates/boards/{error.mako => rate_limited.mako}
R fanboi2/templates/topics/{error.mako => rate_limited.mako}
M fanboi2/tests/test_views.py
M fanboi2/views/pages.py
R fanboi2/templates/boards/error.mako => fanboi2/templates/boards/rate_limited.mako +0 -0
R fanboi2/templates/topics/error.mako => fanboi2/templates/topics/rate_limited.mako +0 -0
M fanboi2/tests/test_views.py => fanboi2/tests/test_views.py +2 -2
@@ 554,7 554,7 @@ class TestPageViews(ViewMixin, unittest.TestCase):
        request = self._POST({'title': 'Thread thread', 'body': 'Words words'})
        request.matchdict['board'] = board.slug
        config = self._makeConfig(request, self._makeRegistry())
        config.testing_add_renderer('boards/error.mako')
        config.testing_add_renderer('boards/rate_limited.mako')
        limited_.return_value = True
        time_.return_value = 10



@@ 729,7 729,7 @@ class TestPageViews(ViewMixin, unittest.TestCase):
        request.matchdict['board'] = board.slug
        request.matchdict['topic'] = topic.id
        config = self._makeConfig(request, self._makeRegistry())
        config.testing_add_renderer('topics/error.mako')
        config.testing_add_renderer('topics/rate_limited.mako')
        limited_.return_value = True
        time_.return_value = 10


M fanboi2/views/pages.py => fanboi2/views/pages.py +2 -2
@@ 76,7 76,7 @@ def board_new_post(request):
            _query={'task': task.id}))
    except RateLimitedError as e:
        timeleft = e.timeleft
        response = render_to_response('boards/error.mako', locals())
        response = render_to_response('boards/rate_limited.mako', locals())
        response.status = e.http_status
        return response
    except ParamsInvalidError as e:


@@ 123,7 123,7 @@ def topic_show_post(request):
            _query={'task': task.id}))
    except RateLimitedError as e:
        timeleft = e.timeleft
        response = render_to_response('topics/error.mako', locals())
        response = render_to_response('topics/rate_limited.mako', locals())
        response.status = e.http_status
        return response
    except ParamsInvalidError as e: