00af109e2f
* add flake8 to pre-commit config, and fixup many things to make flake8 happy * add isort and sort all imports, add to pre-commit and requirements
15 lines
355 B
Python
15 lines
355 B
Python
from django.views.generic import ListView
|
|
|
|
from camps.mixins import CampViewMixin
|
|
|
|
from .models import ProductCategory
|
|
|
|
|
|
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)
|