"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 16.11.20

"""
from django.http import HttpRequest
from django.shortcuts import render

from konova.contexts import BaseContext


def get_404_view(request: HttpRequest, exception=None):
    """ Returns a 404 handling view

    Args:
        request ():
        exception ():

    Returns:

    """
    context = BaseContext.context
    return render(request, "404.html", context, status=404)


def get_400_view(request: HttpRequest, exception=None):
    """ Returns a 400 handling view

    Args:
        request ():
        exception ():

    Returns:

    """
    context = BaseContext.context
    return render(request, "400.html", context, status=400)


def get_500_view(request: HttpRequest):
    """ Returns a 404 handling view

    Args:
        request ():

    Returns:

    """
    context = BaseContext.context
    return render(request, "500.html", context, status=500)
