Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ECE651_Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chris Li
ECE651_Backend
Commits
07e35089
Commit
07e35089
authored
1 year ago
by
Chris Li
Browse files
Options
Downloads
Patches
Plain Diff
Modify categories list in billPriceSum
parent
8f6e4d64
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/api/bill.py
+0
-4
0 additions, 4 deletions
core/api/bill.py
core/api/billPriceSum.py
+12
-11
12 additions, 11 deletions
core/api/billPriceSum.py
with
12 additions
and
15 deletions
core/api/bill.py
+
0
−
4
View file @
07e35089
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
core/api/billPriceSum.py
+
12
−
11
View file @
07e35089
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment