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')

[((289, 342), 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), "(request, 'error_handler/http_error.html', ctx)\n", (295, 342), False, 'from django.shortcuts import render\n'), ((612, 665), 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), "(request, 'error_handler/http_error.html', ctx)\n", (618, 665), False, 'from django.shortcuts import render\n'), ((932, 985), 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), "(request, 'error_handler/http_error.html', ctx)\n", (938, 985), False, 'from django.shortcuts import render\n'), ((1239, 1292), 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), "(request, 'error_handler/http_error.html', ctx)\n", (1245, 1292), False, 'from django.shortcuts import render\n'), ((1429, 1479), 'django.shortcuts.render', 'render', (['request', '"""error_handler/csrf_failure.html"""'], {}), "(request, 'error_handler/csrf_failure.html')\n", (1435, 1479), False, 'from django.shortcuts import render\n'), ((192, 208), 'django.utils.translation.ugettext', '_', (['"""Bad request"""'], {}), "('Bad request')\n", (193, 208), True, 'from django.utils.translation import ugettext as _\n'), ((232, 272), 'django.utils.translation.ugettext', '_', (['"""There was an error in your request."""'], {}), "('There was an error in your request.')\n", (233, 272), True, 'from django.utils.translation import ugettext as _\n'), ((502, 516), 'django.utils.translation.ugettext', '_', (['"""Forbidden"""'], {}), "('Forbidden')\n", (503, 516), True, 'from django.utils.translation import ugettext as _\n'), ((540, 595), 'django.utils.translation.ugettext', '_', (['"""You don\'t have the permission to access this page."""'], {}), '("You don\'t have the permission to access this page.")\n', (541, 595), True, 'from django.utils.translation import ugettext as _\n'), ((825, 844), 'django.utils.translation.ugettext', '_', (['"""Page not found"""'], {}), "('Page not found')\n", (826, 844), True, 'from django.utils.translation import ugettext as _\n'), ((868, 915), 'django.utils.translation.ugettext', '_', (['"""The page you requested could not be found."""'], {}), "('The page you requested could not be found.')\n", (869, 915), True, 'from django.utils.translation import ugettext as _\n'), ((1134, 1160), 'django.utils.translation.ugettext', '_', (['"""Internal Server Error"""'], {}), "('Internal Server Error')\n", (1135, 1160), True, 'from django.utils.translation import ugettext as _\n'), ((1184, 1222), 'django.utils.translation.ugettext', '_', (['"""An unexpected error has occurred."""'], {}), "('An unexpected error has occurred.')\n", (1185, 1222), True, 'from django.utils.translation import ugettext as _\n')]