refactor: match urls using pretalx' custom SLUG_REGEX

This commit is contained in:
Luca 2024-11-02 19:20:35 +01:00
parent a693370a7d
commit 6823e11ff0
1 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
from django.urls import include, path
from django.urls import include, path, re_path
from pretalx.event.models.event import SLUG_REGEX
from .views import (
AssigneeView,
@ -13,8 +14,8 @@ from .views import (
)
urlpatterns = [
path(
"orga/event/<slug:event>/",
re_path(
rf"^orga/event/(?P<event>{SLUG_REGEX})/",
include(
[
path(
@ -39,8 +40,8 @@ urlpatterns = [
]
),
),
path(
"<slug:event>/p/pretalx_musicrate/",
re_path(
rf"^(?P<event>{SLUG_REGEX})/p/pretalx_musicrate/",
include(
[
path("", QRCodeView.as_view(), name="qrcode"),