2017-03-31 15:29:28 +00:00
|
|
|
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)
|
2017-03-31 15:29:28 +00:00
|
|
|
context_object_name = 'teams'
|
|
|
|
|
|
|
|
|
|
|
|
class TeamDetailView(CampViewMixin, DetailView):
|
|
|
|
template_name = "team_detail.html"
|
|
|
|
model = Team
|
|
|
|
context_object_name = 'team'
|