bornhack-website/src/sponsors/views.py
2018-05-26 15:22:45 +02:00

21 lines
489 B
Python

from django.views.generic import TemplateView, ListView
from camps.mixins import CampViewMixin
from .models import Sponsor
class SponsorsView(CampViewMixin, ListView):
model = Sponsor
template_name = 'sponsors.html'
context_object_name = 'sponsors'
def get_queryset(self, **kwargs):
queryset = super().get_queryset()
return queryset.filter(
tier__camp=self.camp
).order_by(
'tier__weight',
'name',
)