django 初步渲染 markdown
def test(request, *args, **kwargs):
with open('templates/课程学习相关表结构设计 v0.2.0.md', 'r', encoding='UTF-8') as f:
content = f.read()
return render(request, 'test.html',
{'content': markdown.markdown(content, extensions=['markdown.extensions.extra','markdown.extensions.codehilite','markdown.extensions.toc'])})
urlpatterns = [
path('', test),
path('admin/', admin.site.urls),
]