forked from rc/aircox
!112 Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: rc/aircox#113
This commit is contained in:
@ -48,9 +48,7 @@ class BaseView(TemplateResponseMixin, ContextMixin):
|
||||
kwargs["sidebar_list_url"] = self.get_sidebar_url()
|
||||
|
||||
if "audio_streams" not in kwargs:
|
||||
streams = self.station.audio_streams
|
||||
streams = streams and streams.split("\n")
|
||||
kwargs["audio_streams"] = streams
|
||||
kwargs["audio_streams"] = self.station.streams
|
||||
|
||||
if "model" not in kwargs:
|
||||
model = (
|
||||
@ -63,7 +61,7 @@ class BaseView(TemplateResponseMixin, ContextMixin):
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
|
||||
# FIXME: rename to sth like [Base]?StationAPIView
|
||||
# FIXME: rename to sth like [Base]?StationAPIView/Mixin
|
||||
class BaseAPIView:
|
||||
@property
|
||||
def station(self):
|
||||
|
@ -91,6 +91,8 @@ class AttachedToMixin:
|
||||
return super().get_page()
|
||||
|
||||
|
||||
# FIXME: django-filter provides filter mixin, but I don't remember why this is
|
||||
# used.
|
||||
class FiltersMixin:
|
||||
"""Mixin integrating Django filters' filter set."""
|
||||
|
||||
|
Reference in New Issue
Block a user