Compare commits

..

2 Commits

3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,4 @@
def station(request):
station = request.station
return {"station": station, "audio_streams": station.streams}
audio_streams = station.streams if station else None
return {"station": station, "audio_streams": audio_streams}

View File

@ -2,6 +2,13 @@
{% load static i18n humanize honeypot aircox %}
{% block head_extra %}
{{ form.media }}
{% endblock %}
{% block init-scripts %}
{% endblock %}
{% block top-nav-tools %}
<a class="navbar-item" href="{% url 'program-detail' object.slug %}"
target="new">

View File

@ -2,6 +2,7 @@ from django.contrib.auth.mixins import UserPassesTestMixin
from django.forms import ModelForm, ImageField
from django.urls import reverse
from ckeditor.fields import RichTextField
from filer.models.imagemodels import Image
from ..models import Page, Program, StaticPage
@ -35,6 +36,7 @@ class ProgramDetailView(BaseProgramMixin, PageDetailView):
class ProgramForm(ModelForm):
content = RichTextField()
new_cover = ImageField(required=False)
class Meta: