mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-01 00:05:50 +00:00
use generic View instead of TemplateView when not rendering templates
This commit is contained in:
parent
d42a2744d0
commit
8dd9bec525
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ import datetime as dt
|
|||
|
||||
import pytz
|
||||
from django.http import JsonResponse
|
||||
from django.views import View
|
||||
from django.views.generic import FormView
|
||||
from django.views.generic.base import TemplateView
|
||||
from pretalx.agenda.views.schedule import ScheduleMixin
|
||||
|
@ -49,7 +50,7 @@ class BroadcastToolsOrgaView(PermissionRequired, FormView):
|
|||
}
|
||||
|
||||
|
||||
class BroadcastToolsEventInfoView(TemplateView):
|
||||
class BroadcastToolsEventInfoView(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
color = self.request.event.primary_color or "#3aa57c"
|
||||
return JsonResponse(
|
||||
|
@ -64,7 +65,7 @@ class BroadcastToolsEventInfoView(TemplateView):
|
|||
)
|
||||
|
||||
|
||||
class BroadcastToolsScheduleView(EventPermissionRequired, ScheduleMixin, TemplateView):
|
||||
class BroadcastToolsScheduleView(EventPermissionRequired, ScheduleMixin, View):
|
||||
permission_required = "agenda.view_schedule"
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue