mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-10 21:35:50 +00:00
Code style
This commit is contained in:
parent
6f8c536cb8
commit
545bdfb966
3 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.translation import gettext_lazy
|
from django.utils.translation import gettext_lazy
|
||||||
|
|
||||||
from pretalx_broadcast_tools import __version__
|
from pretalx_broadcast_tools import __version__
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ from reportlab.platypus import (
|
||||||
TableStyle,
|
TableStyle,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .utils.placeholders import placeholders
|
from pretalx_broadcast_tools.utils.placeholders import placeholders
|
||||||
|
|
||||||
A4_WIDTH, A4_HEIGHT = A4
|
A4_WIDTH, A4_HEIGHT = A4
|
||||||
PAGE_PADDING = 10 * mm
|
PAGE_PADDING = 10 * mm
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree
|
||||||
|
|
||||||
import qrcode
|
import qrcode
|
||||||
import qrcode.image.svg
|
import qrcode.image.svg
|
||||||
|
@ -15,7 +15,7 @@ class BroadcastToolsFeedbackQrCodeSvg(View):
|
||||||
image = qrcode.make(
|
image = qrcode.make(
|
||||||
f"{domain}{talk.urls.feedback}", image_factory=qrcode.image.svg.SvgImage
|
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")
|
return HttpResponse(svg_data, content_type="image/svg+xml")
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,5 +26,5 @@ class BroadcastToolsPublicQrCodeSvg(View):
|
||||||
image = qrcode.make(
|
image = qrcode.make(
|
||||||
f"{domain}{talk.urls.public}", image_factory=qrcode.image.svg.SvgImage
|
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")
|
return HttpResponse(svg_data, content_type="image/svg+xml")
|
||||||
|
|
Loading…
Reference in a new issue