forked from rc/aircox
- player bug in admin fix
- player rendering issue fix - station.streams property - glitch in template rendering when page parent is not published
This commit is contained in:
@ -1,14 +1,10 @@
|
||||
|
||||
from django.http import Http404
|
||||
from django.views.generic import DetailView, ListView
|
||||
from django.views.generic.base import TemplateResponseMixin, ContextMixin
|
||||
from django.urls import reverse
|
||||
|
||||
from ..models import Page
|
||||
from ..utils import Redirect
|
||||
|
||||
|
||||
__all__ = ['BaseView']
|
||||
__all__ = ('BaseView', 'BaseAPIView')
|
||||
|
||||
|
||||
class BaseView(TemplateResponseMixin, ContextMixin):
|
||||
@ -55,8 +51,8 @@ class BaseView(TemplateResponseMixin, ContextMixin):
|
||||
kwargs['audio_streams'] = streams
|
||||
|
||||
if 'model' not in kwargs:
|
||||
model = getattr(self, 'model', None) or hasattr(self, 'object') and \
|
||||
type(self.object)
|
||||
model = getattr(self, 'model', None) or \
|
||||
hasattr(self, 'object') and type(self.object)
|
||||
kwargs['model'] = model
|
||||
|
||||
return super().get_context_data(**kwargs)
|
||||
|
Reference in New Issue
Block a user