Add error check view

This commit is contained in:
Gabriel Augendre 2023-03-25 21:14:42 +01:00
parent a697b3a6f1
commit 56783e79cd
2 changed files with 9 additions and 3 deletions

View file

@ -1,9 +1,10 @@
from django.urls import path
from common.views import home, ping
from common import views
app_name = "common"
urlpatterns = [
path("ping/", ping, name="ping"),
path("", home, name="home"),
path("error_check/", views.error_check, name="error_check"),
path("ping/", views.ping, name="ping"),
path("", views.home, name="home"),
]

View file

@ -7,3 +7,8 @@ def home(_request):
def ping(request):
return render(request, "common/ping.html", {})
def error_check(_request):
msg = "Error check"
raise ValueError(msg)