Commit 93d9afb7 authored by Simon Daron's avatar Simon Daron
Browse files

add view for emissions

parent b580e11f
......@@ -7,7 +7,7 @@ from django.views.decorators.csrf import csrf_exempt
from jsonresponse import to_json
from emissions.models import Emission, Episode, Diffusion, SoundFile, \
from emissions.models import Category, Emission, Episode, Diffusion, SoundFile, \
Schedule, Nonstop, NewsItem, NewsCategory
from emissions.utils import whatsonair
......@@ -190,6 +190,16 @@ class News(TemplateView):
news = News.as_view()
class Emissions(TemplateView):
template_name = 'emissions.html'
def get_context_data(self, **kwargs):
context = super(Emissions, self).get_context_data(**kwargs)
context['emissions'] = Emission.objects.all().order_by('title')
return context
emissions = Emissions.as_view()
class Get(TemplateView):
template_name = 'get.html'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment