Skip to content
Snippets Groups Projects
Commit 07e35089 authored by Chris Li's avatar Chris Li
Browse files

Modify categories list in billPriceSum

parent 8f6e4d64
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,6 @@ from rest_framework import permissions, authentication ...@@ -8,10 +8,6 @@ from rest_framework import permissions, authentication
class BillListCreate(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView): class BillListCreate(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView):
queryset = Bill.objects.all() queryset = Bill.objects.all()
serializer_class = BillSerializer serializer_class = BillSerializer
# authentication_classes = [
# authentication.SessionAuthentication,
# authentication.TokenAuthentication
# ]
permission_classes = (permissions.IsAuthenticated,) permission_classes = (permissions.IsAuthenticated,)
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
......
...@@ -15,17 +15,18 @@ class BillSumPriceListView(generics.ListAPIView): ...@@ -15,17 +15,18 @@ class BillSumPriceListView(generics.ListAPIView):
categorieModel = { categorieModel = {
1: "Food", 1: "Food",
2: "Groceries", 2: "Transportation",
3: "Transportation", 3: "Shopping",
4: "clothing", 4: "Entertainment",
5: "Entertainment", 5: "Housing",
6: "Bill", 6: "Utilities",
7: "Sports", 7: "Other",
8: "Electronics", 8: "Salary",
9: "Travel", 9: "Interest",
10: "House & Car", 10: "Investment",
11: "Salary", 11: "Child benefit",
12: "Others" 12: "Pension",
13: "Income",
} }
queryset = self.filter_queryset(self.get_queryset()) queryset = self.filter_queryset(self.get_queryset())
user = None user = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment