styled the viewblog page

This commit is contained in:
CDaut 2022-06-22 17:05:27 +02:00 committed by CDaut
parent f667432807
commit b0b1ba1bb1
26 changed files with 1303 additions and 4 deletions

View file

@ -1,4 +1,4 @@
from blog.views import viewblog, addpost, createmocks, order, index
from blog.views import viewblog, addpost, order, index, createmocks
from django.urls import path
urlpatterns = [

View file

@ -20,7 +20,8 @@ def viewblog(request, title) -> HttpResponse:
md_file_content = mdfile.read()
mdfile.close()
html = markdown2.markdown(md_file_content, extras=['footnote', 'task_list', 'strike'])
html = markdown2.markdown(md_file_content, extras=['footnotes', 'task_list', 'strike', 'break-on-newline', 'tables',
'fenced-code-blocks'])
context = {'post': post, 'html': html}
return render(request, 'blog/viewpost.html', context)