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, 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), False, 'from django.shortcuts import render\n'), (17, 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), False, 'from django.shortcuts import render\n'), (25, 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), False, 'from django.shortcuts import render\n'), (33, 'django.shortcuts.render', 'render', (['request', '"""error_handler/http_error.html"""', 'ctx'], {}), False, 'from django.shortcuts import render\n'), (39, 'django.shortcuts.render', 'render', (['request', '"""error_handler/csrf_failure.html"""'], {}), False, 'from django.shortcuts import render\n'), (7, 'django.utils.translation.ugettext', '_', (['"""Bad request"""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (8, 'django.utils.translation.ugettext', '_', (['"""There was an error in your request."""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (15, 'django.utils.translation.ugettext', '_', (['"""Forbidden"""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (16, 'django.utils.translation.ugettext', '_', (['"""You don\'t have the permission to access this page."""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (23, 'django.utils.translation.ugettext', '_', (['"""Page not found"""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (24, 'django.utils.translation.ugettext', '_', (['"""The page you requested could not be found."""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (31, 'django.utils.translation.ugettext', '_', (['"""Internal Server Error"""'], {}), True, 'from django.utils.translation import ugettext as _\n'), (32, 'django.utils.translation.ugettext', '_', (['"""An unexpected error has occurred."""'], {}), True, 'from django.utils.translation import ugettext as _\n')]