Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
b9ea687d
Commit
b9ea687d
authored
Aug 06, 2016
by
Sli
Browse files
Fixed comment
parent
c2ccf630
Changes
1
Hide whitespace changes
Inline
Side-by-side
api/views/api.py
View file @
b9ea687d
...
...
@@ -30,13 +30,13 @@ class CounterViewSet(viewsets.ModelViewSet):
@
list_route
()
def
bar
(
self
,
request
):
"""
Return all counters (api/v1/counter/
all
)
Return all counters (api/v1/counter/
bar
)
"""
self
.
queryset
=
Counter
.
objects
.
filter
(
type
=
"BAR"
)
serializer
=
self
.
get_serializer
(
self
.
queryset
,
many
=
True
)
return
Response
(
serializer
.
data
)
@
detail_route
(
methods
=
[
'GET'
]
)
@
detail_route
()
def
id
(
self
,
request
,
pk
=
None
):
"""
Get by id (api/v1/{nk}/id)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment