Sith/api/views/api.py

15 lines
319 B
Python
Raw Normal View History

2016-08-04 22:50:48 +00:00
from rest_framework.response import Response
from rest_framework.decorators import api_view
from core.templatetags.renderer import markdown
2016-08-07 22:33:02 +00:00
2016-08-04 22:50:48 +00:00
@api_view(['GET'])
def RenderMarkdown(request):
"""
Render Markdown
"""
if request.method == 'GET':
return Response(markdown(request.GET['text']))
2016-08-05 18:01:23 +00:00