Show only camp bar products.
This commit is contained in:
parent
ff6912fed8
commit
932d6aaa90
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue