bornhack-website/src/bar/views.py

15 lines
355 B
Python
Raw Normal View History

from django.views.generic import ListView
2018-08-16 16:27:59 +00:00
from camps.mixins import CampViewMixin
2018-03-04 13:31:13 +00:00
from .models import ProductCategory
2017-08-26 01:48:02 +00:00
2018-08-16 16:27:59 +00:00
class MenuView(CampViewMixin, ListView):
2017-08-26 01:48:02 +00:00
model = ProductCategory
template_name = "bar_menu.html"
context_object_name = "categories"
2018-08-16 16:27:59 +00:00
def get_queryset(self):
return super().get_queryset().filter(camp=self.camp)