Show only camp bar products.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-08-16 18:27:59 +02:00
parent ff6912fed8
commit 932d6aaa90

View file

@ -1,8 +1,12 @@
from camps.mixins import CampViewMixin
from .models import ProductCategory
from django.views.generic import ListView
class MenuView(ListView):
class MenuView(CampViewMixin, ListView):
model = ProductCategory
template_name = "bar_menu.html"
context_object_name = "categories"
def get_queryset(self):
return super().get_queryset().filter(camp=self.camp)