1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-11-22 03:01:02 +00:00

replace re_path() with include() and path()

This commit is contained in:
Franzi 2024-10-31 21:22:35 +01:00
parent 9ebcde7ab1
commit 6a3b1b309e
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -1,5 +1,4 @@
from django.urls import re_path from django.urls import include, path
from pretalx.event.models.event import SLUG_REGEX
from .views.event_info import BroadcastToolsEventInfoView from .views.event_info import BroadcastToolsEventInfoView
from .views.orga import BroadcastToolsOrgaView from .views.orga import BroadcastToolsOrgaView
@ -8,38 +7,45 @@ from .views.schedule import BroadcastToolsScheduleView
from .views.static_html import BroadcastToolsLowerThirdsView, BroadcastToolsRoomInfoView from .views.static_html import BroadcastToolsLowerThirdsView, BroadcastToolsRoomInfoView
urlpatterns = [ urlpatterns = [
re_path( path(
rf"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/event.json$", "<slug:event>/p/broadcast-tools/",
include(
[
path(
"event.json",
BroadcastToolsEventInfoView.as_view(), BroadcastToolsEventInfoView.as_view(),
name="event_info", name="event_info",
), ),
re_path( path(
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/schedule.json$", "schedule.json",
BroadcastToolsScheduleView.as_view(), BroadcastToolsScheduleView.as_view(),
name="schedule", name="schedule",
), ),
re_path( path(
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/lower-thirds/$", "lower-thirds/",
BroadcastToolsLowerThirdsView.as_view(), BroadcastToolsLowerThirdsView.as_view(),
name="lowerthirds", name="lowerthirds",
), ),
re_path( path(
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/feedback-qr/(?P<talk>[0-9]+).svg$", "feedback-qr/<talk>.svg",
BroadcastToolsFeedbackQrCodeSvg.as_view(), BroadcastToolsFeedbackQrCodeSvg.as_view(),
name="feedback_qr_id", name="feedback_qr_id",
), ),
re_path( path(
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/public-qr/(?P<talk>[0-9]+).svg$", "public-qr/<talk>.svg",
BroadcastToolsPublicQrCodeSvg.as_view(), BroadcastToolsPublicQrCodeSvg.as_view(),
name="public_qr_id", name="public_qr_id",
), ),
re_path( path(
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/room-info/$", "room-info/",
BroadcastToolsRoomInfoView.as_view(), BroadcastToolsRoomInfoView.as_view(),
name="room_info", name="room_info",
), ),
re_path( ],
f"^orga/event/(?P<event>{SLUG_REGEX})/settings/p/broadcast-tools/$", ),
),
path(
"orga/event/<slug:event>/settings/p/broadcast-tools/",
BroadcastToolsOrgaView.as_view(), BroadcastToolsOrgaView.as_view(),
name="orga", name="orga",
), ),