from django.shortcuts import render
from django.utils.translation import ugettext as _


# pylint: disable=unused-argument
def handler400(request, exception):
    ctx = {'code': 400, 'title': _('Bad request'),
           'message': _('There was an error in your request.')}
    response = render(request, 'error_handler/http_error.html', ctx)
    response.status_code = 400
    return response

    # pylint: disable=unused-argument
def handler403(request, exception):
    ctx = {'code': 403, 'title': _('Forbidden'),
           'message': _("You don't have the permission to access this page.")}
    response = render(request, 'error_handler/http_error.html', ctx)
    response.status_code = 403
    return response

    # pylint: disable=unused-argument
def handler404(request, exception):
    ctx = {'code': 404, 'title': _('Page not found'),
           'message': _('The page you requested could not be found.')}
    response = render(request, 'error_handler/http_error.html', ctx)
    response.status_code = 404
    return response

    # pylint: disable=unused-argument
def handler500(request):
    ctx = {'code': 500, 'title': _('Internal Server Error'),
           'message': _('An unexpected error has occurred.')}
    response = render(request, 'error_handler/http_error.html', ctx)
    response.status_code = 500
    return response

    # pylint: disable=unused-argument
def csrf_failure(request, reason):
    return render(request, 'error_handler/csrf_failure.html')

[((9, 15, 9, 68), 'django.shortcuts.render', 'render', ({(9, 22, 9, 29): 'request', (9, 31, 9, 62): '"""error_handler/http_error.html"""', (9, 64, 9, 67): 'ctx'}, {}), "(request, 'error_handler/http_error.html', ctx)", False, 'from django.shortcuts import render\n'), ((17, 15, 17, 68), 'django.shortcuts.render', 'render', ({(17, 22, 17, 29): 'request', (17, 31, 17, 62): '"""error_handler/http_error.html"""', (17, 64, 17, 67): 'ctx'}, {}), "(request, 'error_handler/http_error.html', ctx)", False, 'from django.shortcuts import render\n'), ((25, 15, 25, 68), 'django.shortcuts.render', 'render', ({(25, 22, 25, 29): 'request', (25, 31, 25, 62): '"""error_handler/http_error.html"""', (25, 64, 25, 67): 'ctx'}, {}), "(request, 'error_handler/http_error.html', ctx)", False, 'from django.shortcuts import render\n'), ((33, 15, 33, 68), 'django.shortcuts.render', 'render', ({(33, 22, 33, 29): 'request', (33, 31, 33, 62): '"""error_handler/http_error.html"""', (33, 64, 33, 67): 'ctx'}, {}), "(request, 'error_handler/http_error.html', ctx)", False, 'from django.shortcuts import render\n'), ((39, 11, 39, 61), 'django.shortcuts.render', 'render', ({(39, 18, 39, 25): 'request', (39, 27, 39, 60): '"""error_handler/csrf_failure.html"""'}, {}), "(request, 'error_handler/csrf_failure.html')", False, 'from django.shortcuts import render\n'), ((7, 33, 7, 49), 'django.utils.translation.ugettext', '_', ({(7, 35, 7, 48): '"""Bad request"""'}, {}), "('Bad request')", True, 'from django.utils.translation import ugettext as _\n'), ((8, 22, 8, 62), 'django.utils.translation.ugettext', '_', ({(8, 24, 8, 61): '"""There was an error in your request."""'}, {}), "('There was an error in your request.')", True, 'from django.utils.translation import ugettext as _\n'), ((15, 33, 15, 47), 'django.utils.translation.ugettext', '_', ({(15, 35, 15, 46): '"""Forbidden"""'}, {}), "('Forbidden')", True, 'from django.utils.translation import ugettext as _\n'), ((16, 22, 16, 77), 'django.utils.translation.ugettext', '_', ({(16, 24, 16, 76): '"""You don\'t have the permission to access this page."""'}, {}), '("You don\'t have the permission to access this page.")', True, 'from django.utils.translation import ugettext as _\n'), ((23, 33, 23, 52), 'django.utils.translation.ugettext', '_', ({(23, 35, 23, 51): '"""Page not found"""'}, {}), "('Page not found')", True, 'from django.utils.translation import ugettext as _\n'), ((24, 22, 24, 69), 'django.utils.translation.ugettext', '_', ({(24, 24, 24, 68): '"""The page you requested could not be found."""'}, {}), "('The page you requested could not be found.')", True, 'from django.utils.translation import ugettext as _\n'), ((31, 33, 31, 59), 'django.utils.translation.ugettext', '_', ({(31, 35, 31, 58): '"""Internal Server Error"""'}, {}), "('Internal Server Error')", True, 'from django.utils.translation import ugettext as _\n'), ((32, 22, 32, 60), 'django.utils.translation.ugettext', '_', ({(32, 24, 32, 59): '"""An unexpected error has occurred."""'}, {}), "('An unexpected error has occurred.')", True, 'from django.utils.translation import ugettext as _\n')]