bornhack-website/src/teams/views.py

18 lines
431 B
Python
Raw Normal View History

from django.views.generic import ListView, DetailView
from camps.mixins import CampViewMixin
from .models import Team
class TeamListView(CampViewMixin, ListView):
template_name = "team_list.html"
2017-04-01 21:16:23 +00:00
queryset = Team.objects.filter(sub_team_of=None)
context_object_name = 'teams'
class TeamDetailView(CampViewMixin, DetailView):
template_name = "team_detail.html"
model = Team
context_object_name = 'team'