summaryrefslogtreecommitdiff
path: root/app/expenses/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/expenses/views.py')
-rw-r--r--app/expenses/views.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/expenses/views.py b/app/expenses/views.py
index 3a8d2cb..98a4c70 100644
--- a/app/expenses/views.py
+++ b/app/expenses/views.py
@@ -1,7 +1,6 @@
from django.views.generic import ListView
-from .models import Expense, Trip, CATS
-
+from .models import LuxExpense, Expense, Trip, CATS
class ExpenseListView(ListView):
model = Expense
@@ -19,6 +18,16 @@ class ExpenseListView(ListView):
context['categories'] = CATS
return context
+class LuxExpenseListView(ListView):
+ model = LuxExpense
+ context_object_name = 'object_list'
+ template_name = 'details/expenses.html'
+
+ def get_context_data(self, **kwargs):
+ # Call the base implementation first to get a context
+ context = super(LuxExpenseListView, self).get_context_data(**kwargs)
+ context['categories'] = CATS
+ return context
class TripListView(ListView):
model = Trip