mirror of
https://github.com/ae-utbm/sith.git
synced 2026-05-24 01:40:16 +00:00
First steps with the api
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
from .api import *
|
||||
from .serializers import *
|
||||
@@ -0,0 +1,13 @@
|
||||
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']))
|
||||
@@ -0,0 +1 @@
|
||||
from rest_framework import serializers
|
||||
Reference in New Issue
Block a user