Skip to content

Commit

Permalink
Merge pull request #4836 from rtfd/add-docstring
Browse files Browse the repository at this point in the history
Add docstring to DrfJsonSerializer so we know why it's there
  • Loading branch information
ericholscher committed Nov 1, 2018
2 parents c476aee + e1810e4 commit fb3c875
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion readthedocs/restapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"""Simple client to access our API with Slumber credentials."""

from __future__ import (
absolute_import, division, print_function, unicode_literals)
absolute_import,
division,
print_function,
unicode_literals,
)

import logging

Expand All @@ -28,6 +32,7 @@ class DrfJsonSerializer(serialize.JsonSerializer):
key = 'json-drf'

def dumps(self, data):
"""Used to be able to render datetime objects."""
return JSONRenderer().render(data)


Expand Down

0 comments on commit fb3c875

Please sign in to comment.