mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-12-22 14:11:48 +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 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"),
|
||||
]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue