2016-12-25 14:52:55 +00:00
|
|
|
from django.views.generic import ListView, DetailView
|
|
|
|
from django.utils import timezone
|
|
|
|
from .models import *
|
2015-10-05 16:35:30 +00:00
|
|
|
|
2015-10-03 01:07:05 +00:00
|
|
|
|
2016-12-25 14:52:55 +00:00
|
|
|
class CampDetailView(DetailView):
|
|
|
|
model = Camp
|
|
|
|
slug_url_kwarg = 'camp_slug'
|
|
|
|
|
2017-01-20 15:18:10 +00:00
|
|
|
def get_template_names(self):
|
2017-01-28 18:30:52 +00:00
|
|
|
return '%s_camp_detail.html' % self.get_object().slug
|
2017-01-20 15:18:10 +00:00
|
|
|
|
2017-01-25 00:49:13 +00:00
|
|
|
|
|
|
|
class CampListView(ListView):
|
|
|
|
model = Camp
|
|
|
|
template_name = 'camp_list.html'
|
|
|
|
|