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

Code style

This commit is contained in:
Tobias Kunze 2024-08-09 11:12:02 +02:00
parent 6f8c536cb8
commit 545bdfb966
3 changed files with 5 additions and 4 deletions

View file

@ -1,5 +1,6 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy
from pretalx_broadcast_tools import __version__

View file

@ -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

View file

@ -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")