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
Hunter T Jozwiak
whats-open
Commits
3244d985
Verified
Commit
3244d985
authored
May 29, 2017
by
David Haynes
🙆
Browse files
Add in a few more words from the docs
- HyperLinked is the only different one, include some more words
parent
4ca79e19
Changes
1
Hide whitespace changes
Inline
Side-by-side
whats-open/api/serializers.py
View file @
3244d985
...
...
@@ -63,6 +63,12 @@ class ScheduleSerializer(serializers.ModelSerializer):
class
FacilitySerializer
(
serializers
.
HyperlinkedModelSerializer
):
"""
Serializer for the Facility model.
From the docs:
The HyperlinkedModelSerializer class is similar to the ModelSerializer
class except that it uses hyperlinks to represent relationships, rather
than primary keys.
http://www.django-rest-framework.org/api-guide/serializers/#hyperlinkedmodelserializer
"""
# Append a serialized Category object
facility_category
=
CategorySerializer
(
many
=
False
,
read_only
=
True
)
...
...
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