mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 22:23:23 +00:00
15 lines
319 B
Python
15 lines
319 B
Python
from rest_framework.response import Response
|
|
from rest_framework.decorators import api_view
|
|
|
|
from core.templatetags.renderer import markdown
|
|
|
|
|
|
@api_view(['GET'])
|
|
def RenderMarkdown(request):
|
|
"""
|
|
Render Markdown
|
|
"""
|
|
if request.method == 'GET':
|
|
return Response(markdown(request.GET['text']))
|
|
|