Markdown description (I thought that was fixed ??)
This commit is contained in:
parent
6197888680
commit
a2e9c57503
|
@ -55,7 +55,9 @@
|
|||
|
||||
|
||||
{% if artist.description %}
|
||||
<p>{{ artist.description }}</p>
|
||||
{% autoescape off %}
|
||||
{{ artist.description }}
|
||||
{% endautoescape %}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue