mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-22 16:18:03 +01:00
Add error check view
This commit is contained in:
parent
a697b3a6f1
commit
56783e79cd
2 changed files with 9 additions and 3 deletions
|
@ -1,9 +1,10 @@
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from common.views import home, ping
|
from common import views
|
||||||
|
|
||||||
app_name = "common"
|
app_name = "common"
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("ping/", ping, name="ping"),
|
path("error_check/", views.error_check, name="error_check"),
|
||||||
path("", home, name="home"),
|
path("ping/", views.ping, name="ping"),
|
||||||
|
path("", views.home, name="home"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -7,3 +7,8 @@ def home(_request):
|
||||||
|
|
||||||
def ping(request):
|
def ping(request):
|
||||||
return render(request, "common/ping.html", {})
|
return render(request, "common/ping.html", {})
|
||||||
|
|
||||||
|
|
||||||
|
def error_check(_request):
|
||||||
|
msg = "Error check"
|
||||||
|
raise ValueError(msg)
|
||||||
|
|
Loading…
Reference in a new issue