diff options
author | lxf <sng@luxagraf.net> | 2022-05-14 16:38:07 -0400 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2022-05-14 16:38:07 -0400 |
commit | bb3973ffb714c932e9ec6dd6a751228dc71fe1d3 (patch) | |
tree | 6fa32f9392ad2ec32271349b86a4c1388fd6ba95 /app/classes/views.py |
initial commit
Diffstat (limited to 'app/classes/views.py')
-rw-r--r-- | app/classes/views.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/classes/views.py b/app/classes/views.py new file mode 100644 index 0000000..620e5db --- /dev/null +++ b/app/classes/views.py @@ -0,0 +1,20 @@ +from utils.views import LuxDetailView +from django.views.generic import DetailView, ListView +from utils.views import PaginatedListView, LuxDetailView + +from .models import Class + + +class ClassDetailView(LuxDetailView): + model = Class + +class ClassListView(PaginatedListView): + model = Class + + def get_context_data(self, **kwargs): + ''' + Add breadcrumb path + ''' + context = super(ClassListView, self).get_context_data(**kwargs) + context['breadcrumbs'] = ("classes",) + return context |