1
0
Fork 0

Add Markdown support to item descriptions

This commit is contained in:
Mateusz Piotrowski 2017-10-07 22:29:28 +02:00 committed by Piotr Dobrowolski
parent 4e2038a094
commit a65c652647
3 changed files with 6 additions and 1 deletions

View File

@ -13,3 +13,4 @@ djangorestframework-hstore==1.3
pyldap==2.4.28
requests==2.16.5
urllib3==1.21.1
django_markdown2==0.3.0

View File

@ -43,6 +43,7 @@ INSTALLED_APPS = [
'tree',
'django_select2',
'rest_framework',
'django_markdown2',
'storage',
]

View File

@ -71,7 +71,10 @@
</div>
<div class="col-md-8">
{{ item.description|urlize }}
{% if item.description %}
{% load md2 %}
{{ item.description|markdown:"code-color" }}
{% endif %}
<h3>Children</h3>
<table class="table table-striped table-hover">