mirror of
https://github.com/ae-utbm/sith3.git
synced 2024-07-03 03:48:04 +00:00
14 lines
318 B
Python
14 lines
318 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']))
|