minor exercise fix
[edumed.git] / catalogue / views.py
1 import os.path
2 from django.conf import settings
3 from django.views.generic import DetailView, ListView
4 from .models import Section
5
6 class SectionView(ListView):
7     model = Section
8
9     def get_context_data(self, **kwargs):
10         context = super(SectionView, self).get_context_data(**kwargs)
11         context['package_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE)
12         context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT)
13         return context