You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
485 B
Python
16 lines
485 B
Python
from django.views.generic import ListView
|
|
|
|
from booking.models import Booking
|
|
|
|
|
|
class BookingListView(ListView):
|
|
template_name = 'employee/booking-list.html'
|
|
model = Booking
|
|
context_object_name = 'objects'
|
|
paginate_by = 30 # Number of containers per page
|
|
base_template = 'employee-base.html'
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super().get_context_data(**kwargs)
|
|
context['base_template'] = self.base_template
|
|
return context |