-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use to_representation in favor of get_attribute (#848)
* use `to_represenation` in favor of `get_attribute` * fix datetime type does get converted to a string to_representation will convert the datetime field into a string representation. However the to_representation on the method field will only call its underlying method. * fix add missing import * apply black formatter * add test for serializer method field * apply black format * improve backward compatibility by using date's class contructor instead of fromisostring * apply black format * fix black format issue
- Loading branch information
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters