from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from rowers.views.statements import *

from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from django.test import SimpleTestCase, override_settings
from django.urls import path


def servererror_view(request):
    raise ValueError

# Custom error pages with Rowsandall headers
def error500_view(request):
    response = render(request,'500.html', {},status=500)
#				  context_instance = RequestContext(request))

    response.status_code = 500
    return response

def error404_view(request, exception):
    response = render(request,'404.html', {},status=404)
#				  context_instance = RequestContext(request))

    response.status_code = 404
    return response

def error400_view(request, exception):
    response = render(request,'400.html', {},status=400)
#				  context_instance = RequestContext(request))

    response.status_code = 400
    return response

def error403_view(request,*args, **kwargs):
    response = render(request,'403.html', {},status=403)
#				  context_instance = RequestContext(request))

    response.status_code = 403
    return response
