1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-04-28 22:07:22 +00:00

more style fixes

This commit is contained in:
Franzi 2021-11-21 13:30:31 +01:00
parent 6d58ba7feb
commit 5f47157b86
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 8 additions and 12 deletions

View file

@ -6,8 +6,7 @@ from i18nfield.forms import I18nFormField, I18nFormMixin, I18nTextInput
class LowerThirdsSettingsForm(I18nFormMixin, HierarkeyForm): class LowerThirdsSettingsForm(I18nFormMixin, HierarkeyForm):
lower_thirds_no_talk_info = I18nFormField( lower_thirds_no_talk_info = I18nFormField(
help_text=_( help_text=_(
"Will be shown as talk title if there's currently no talk " "Will be shown as talk title if there's currently no talk running."
"running."
), ),
label=_('"no talk running" information'), label=_('"no talk running" information'),
widget=I18nTextInput, widget=I18nTextInput,

View file

@ -1,6 +1,7 @@
from django.dispatch import receiver from django.dispatch import receiver
from django.urls import resolve, reverse from django.urls import resolve, reverse
from django.utils.translation import gettext_noop, ugettext_lazy as _ from django.utils.translation import gettext_noop
from django.utils.translation import ugettext_lazy as _
from i18nfield.strings import LazyI18nString from i18nfield.strings import LazyI18nString
from pretalx.common.models.settings import hierarkey from pretalx.common.models.settings import hierarkey
from pretalx.orga.signals import nav_event_settings from pretalx.orga.signals import nav_event_settings

View file

@ -5,9 +5,7 @@ from django.http import JsonResponse
from django.views.generic import FormView from django.views.generic import FormView
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from pretalx.agenda.views.schedule import ScheduleMixin from pretalx.agenda.views.schedule import ScheduleMixin
from pretalx.common.mixins.views import ( from pretalx.common.mixins.views import EventPermissionRequired, PermissionRequired
EventPermissionRequired, PermissionRequired,
)
from pretalx.schedule.exporters import ScheduleData from pretalx.schedule.exporters import ScheduleData
from .forms import LowerThirdsSettingsForm from .forms import LowerThirdsSettingsForm
@ -57,8 +55,7 @@ class ScheduleView(EventPermissionRequired, ScheduleMixin, TemplateView):
"conference": { "conference": {
"slug": schedule.event.slug, "slug": schedule.event.slug,
"name": str(schedule.event.name), "name": str(schedule.event.name),
"no_talk": str( "no_talk": str(schedule.event.settings.lower_thirds_no_talk_info),
schedule.event.settings.lower_thirds_no_talk_info),
}, },
"rooms": sorted( "rooms": sorted(
{ {
@ -71,10 +68,9 @@ class ScheduleView(EventPermissionRequired, ScheduleMixin, TemplateView):
{ {
"id": talk.submission.id, "id": talk.submission.id,
"start": talk.start.astimezone(tz).isoformat(), "start": talk.start.astimezone(tz).isoformat(),
"end": ( "end": (talk.start + dt.timedelta(minutes=talk.duration))
talk.start + .astimezone(tz)
dt.timedelta(minutes=talk.duration) .isoformat(),
).astimezone(tz).isoformat(),
"slug": talk.frab_slug, "slug": talk.frab_slug,
"title": talk.submission.title, "title": talk.submission.title,
"persons": sorted( "persons": sorted(