1
0
Fork 0

Markdown description (I thought that was fixed ??)

This commit is contained in:
Shgck 2015-05-02 15:16:55 +02:00
parent 6197888680
commit a2e9c57503
2 changed files with 8 additions and 1 deletions

View file

@ -55,7 +55,9 @@
{% if artist.description %}
<p>{{ artist.description }}</p>
{% autoescape off %}
{{ artist.description }}
{% endautoescape %}
{% endif %}
</td>

View file

@ -1,3 +1,5 @@
import markdown
from django.shortcuts import get_object_or_404, render
from label.models import Artist, Release
@ -16,9 +18,12 @@ def artists(request):
def artist(request, slug):
artist = get_object_or_404(Artist, slug = slug)
artist.description = markdown.markdown(artist.description)
releases = artist.release_set.all()
for release in releases:
release.tag = tools.get_catalog_tag_from_id(release.ident)
context = { "artist": artist, "releases": releases }
return render(request, "label/artist.html", context)