Created
June 18, 2018 03:28
-
-
Save maxpoletaev/262929e749c8339ea31fe2573a6ed45f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from rest_framework import serializers | |
from markdown import markdown | |
class MarkdownField(serializers.CharField): | |
def to_representation(self, value): | |
return markdown(value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment