Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
862e01aa
Commit
862e01aa
authored
Sep 27, 2016
by
Daniel W Bond
Browse files
added comments for api app
parent
4327b240
Changes
2
Hide whitespace changes
Inline
Side-by-side
roomlist/api/serializers.py
View file @
862e01aa
...
...
@@ -107,6 +107,8 @@ class MajorSerializer(serializers.ModelSerializer):
fields
=
(
'name'
,
)
# the first major serializer is used when listing majors; this is used for the
# object's own page's display
class
MajorURLSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
...
...
roomlist/api/views.py
View file @
862e01aa
...
...
@@ -90,7 +90,8 @@ class MajorRetrieve(RetrieveAPIView):
lookup_field
=
'slug'
# root urls
# root urls-- custom version of drf's root DefaultRouter, because we're doing
# atypical things with url handling and aren't using out-of-the-box routers
class
APIRoot
(
APIView
):
def
get
(
self
,
request
):
return
Response
({
...
...
Write
Preview
Markdown
is supported
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