mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-10 21:35:50 +00:00
Merge pull request #22 from pretalx/main
Compatibility with pretalx v2024.2.x
This commit is contained in:
commit
513f3ebe75
10 changed files with 25 additions and 23 deletions
|
@ -59,7 +59,7 @@ Development setup
|
|||
|
||||
3. Activate the virtual environment you use for pretalx development.
|
||||
|
||||
4. Execute ``python setup.py develop`` within this directory to register
|
||||
4. Execute ``python -m pip install -e .`` within this directory to register
|
||||
this application with pretalx's plugin registry.
|
||||
|
||||
5. Execute ``make`` within this directory to compile translations.
|
||||
|
|
1
pretalx_broadcast_tools/__init__.py
Normal file
1
pretalx_broadcast_tools/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__version__ = "2.2.0"
|
|
@ -1,6 +1,8 @@
|
|||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy
|
||||
|
||||
from pretalx_broadcast_tools import __version__
|
||||
|
||||
|
||||
class PluginApp(AppConfig):
|
||||
name = "pretalx_broadcast_tools"
|
||||
|
@ -15,7 +17,7 @@ class PluginApp(AppConfig):
|
|||
"embedded into your broadcasting software"
|
||||
)
|
||||
visible = True
|
||||
version = "2.2.0"
|
||||
version = __version__
|
||||
category = "FEATURE"
|
||||
|
||||
def ready(self):
|
||||
|
|
|
@ -17,7 +17,7 @@ from reportlab.platypus import (
|
|||
TableStyle,
|
||||
)
|
||||
|
||||
from .utils.placeholders import placeholders
|
||||
from pretalx_broadcast_tools.utils.placeholders import placeholders
|
||||
|
||||
A4_WIDTH, A4_HEIGHT = A4
|
||||
PAGE_PADDING = 10 * mm
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.urls import re_path
|
||||
from pretalx.event.models.event import SLUG_CHARS
|
||||
from pretalx.event.models.event import SLUG_REGEX
|
||||
|
||||
from .views.event_info import BroadcastToolsEventInfoView
|
||||
from .views.orga import BroadcastToolsOrgaView
|
||||
|
@ -9,37 +9,37 @@ from .views.static_html import BroadcastToolsLowerThirdsView, BroadcastToolsRoom
|
|||
|
||||
urlpatterns = [
|
||||
re_path(
|
||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/event.json$",
|
||||
rf"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/event.json$",
|
||||
BroadcastToolsEventInfoView.as_view(),
|
||||
name="event_info",
|
||||
),
|
||||
re_path(
|
||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/schedule.json$",
|
||||
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/schedule.json$",
|
||||
BroadcastToolsScheduleView.as_view(),
|
||||
name="schedule",
|
||||
),
|
||||
re_path(
|
||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/lower-thirds/$",
|
||||
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/lower-thirds/$",
|
||||
BroadcastToolsLowerThirdsView.as_view(),
|
||||
name="lowerthirds",
|
||||
),
|
||||
re_path(
|
||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/feedback-qr/(?P<talk>[0-9]+).svg$",
|
||||
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/feedback-qr/(?P<talk>[0-9]+).svg$",
|
||||
BroadcastToolsFeedbackQrCodeSvg.as_view(),
|
||||
name="feedback_qr_id",
|
||||
),
|
||||
re_path(
|
||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/public-qr/(?P<talk>[0-9]+).svg$",
|
||||
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/public-qr/(?P<talk>[0-9]+).svg$",
|
||||
BroadcastToolsPublicQrCodeSvg.as_view(),
|
||||
name="public_qr_id",
|
||||
),
|
||||
re_path(
|
||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/room-info/$",
|
||||
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/room-info/$",
|
||||
BroadcastToolsRoomInfoView.as_view(),
|
||||
name="room_info",
|
||||
),
|
||||
re_path(
|
||||
f"^orga/event/(?P<event>[{SLUG_CHARS}]+)/settings/p/broadcast-tools/$",
|
||||
f"^orga/event/(?P<event>{SLUG_REGEX})/settings/p/broadcast-tools/$",
|
||||
BroadcastToolsOrgaView.as_view(),
|
||||
name="orga",
|
||||
),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.views.generic import FormView
|
||||
from pretalx.common.mixins.views import PermissionRequired
|
||||
from pretalx.common.views.mixins import PermissionRequired
|
||||
|
||||
from ..forms import BroadcastToolsSettingsForm
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from xml.etree import ElementTree as ET
|
||||
from xml.etree import ElementTree
|
||||
|
||||
import qrcode
|
||||
import qrcode.image.svg
|
||||
|
@ -15,7 +15,7 @@ class BroadcastToolsFeedbackQrCodeSvg(View):
|
|||
image = qrcode.make(
|
||||
f"{domain}{talk.urls.feedback}", image_factory=qrcode.image.svg.SvgImage
|
||||
)
|
||||
svg_data = mark_safe(ET.tostring(image.get_image()).decode())
|
||||
svg_data = mark_safe(ElementTree.tostring(image.get_image()).decode())
|
||||
return HttpResponse(svg_data, content_type="image/svg+xml")
|
||||
|
||||
|
||||
|
@ -26,5 +26,5 @@ class BroadcastToolsPublicQrCodeSvg(View):
|
|||
image = qrcode.make(
|
||||
f"{domain}{talk.urls.public}", image_factory=qrcode.image.svg.SvgImage
|
||||
)
|
||||
svg_data = mark_safe(ET.tostring(image.get_image()).decode())
|
||||
svg_data = mark_safe(ElementTree.tostring(image.get_image()).decode())
|
||||
return HttpResponse(svg_data, content_type="image/svg+xml")
|
||||
|
|
|
@ -5,7 +5,7 @@ from django.http import JsonResponse
|
|||
from django.urls import reverse
|
||||
from django.views import View
|
||||
from pretalx.agenda.views.schedule import ScheduleMixin
|
||||
from pretalx.common.mixins.views import EventPermissionRequired
|
||||
from pretalx.common.views.mixins import EventPermissionRequired
|
||||
from pretalx.schedule.exporters import ScheduleData
|
||||
|
||||
from ..utils.placeholders import placeholders
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "pretalx-broadcast-tools"
|
||||
version = "2.2.0"
|
||||
dynamic = ["version"]
|
||||
description = """
|
||||
Some tools which can be used for supporting a broadcasting software.
|
||||
This currently includes a generator for PDF printouts, a 'lower thirds'
|
||||
|
@ -24,9 +24,8 @@ dependencies = [
|
|||
pretalx_broadcast_tools = "pretalx_broadcast_tools:PretalxPluginMeta"
|
||||
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
requires = ["setuptools", "wheel"]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/Kunsi/pretalx-plugin-broadcast-tools"
|
||||
|
@ -35,5 +34,8 @@ repository = "https://github.com/Kunsi/pretalx-plugin-broadcast-tools.git"
|
|||
[tool.setuptools]
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "pretalx_broadcast_tools.__version__"}
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["pretalx*"]
|
||||
|
|
3
setup.py
3
setup.py
|
@ -1,3 +0,0 @@
|
|||
from setuptools import setup
|
||||
|
||||
setup()
|
Loading…
Reference in a new issue