Skip to content

Commit 788a3c7

Browse files
authored
Merge pull request #73 from darjeeling/fix_url_path
fix url matching from `re_path` to `path`
2 parents be840e1 + 3093e8d commit 788a3c7

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

ticket/urls.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
from django.urls import re_path
1+
from django.urls import path, re_path
22

33
from . import views
44

55
urlpatterns = [
6-
re_path(r"^conference-ticket-types$", views.get__get_conference_ticket_types),
6+
path("conference-ticket-types", views.get__get_conference_ticket_types),
77
re_path(
88
r"^conference-ticket-types/(?P<ticket_type_code>\w+)/check",
99
views.get__check_conference_ticket_type_buyable,
1010
),
11-
re_path(r"^conference-tickets", views.post__add_conference_ticket),
12-
re_path(r"^list$", views.temp),
13-
re_path(r"^{item_id}$", views.temp),
14-
re_path(r"^success$", views.temp),
15-
re_path(r"^failed$", views.temp),
16-
re_path(r"^{ticket_id}/refund$", views.temp),
11+
path("conference-tickets", views.post__add_conference_ticket),
12+
path("list", views.temp),
13+
path("<int:item_id>", views.temp),
14+
path("success", views.temp),
15+
path("failed", views.temp),
16+
path("<int:ticket_id>/refund", views.temp_refund),
1717
]

ticket/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,6 @@ def post__add_conference_ticket(request: HttpRequest, **kwargs) -> HttpResponse:
159159

160160
def temp():
161161
pass
162+
163+
def temp_refund(ticket_id):
164+
pass

0 commit comments

Comments
 (0)