duck-booking-tool/booking/views.py

20 lines
373 B
Python
Raw Permalink Normal View History

2015-10-20 14:26:25 +00:00
# -*- coding: utf-8
"""
Views for the Duck Booking Tool frontend
"""
2014-12-23 08:28:43 +00:00
from django.views import generic
from .models import Duck
class DuckListView(generic.ListView):
2015-10-20 14:26:25 +00:00
"""
View for duck listing (the main page)
"""
2014-12-23 08:28:43 +00:00
template_name = 'booking/duck_list.html'
context_object_name = 'duck_list'
def get_queryset(self):
return Duck.objects.all()