Markdown description (I thought that was fixed ??)
This commit is contained in:
parent
6197888680
commit
a2e9c57503
|
@ -55,7 +55,9 @@
|
||||||
|
|
||||||
|
|
||||||
{% if artist.description %}
|
{% if artist.description %}
|
||||||
<p>{{ artist.description }}</p>
|
{% autoescape off %}
|
||||||
|
{{ artist.description }}
|
||||||
|
{% endautoescape %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import markdown
|
||||||
|
|
||||||
from django.shortcuts import get_object_or_404, render
|
from django.shortcuts import get_object_or_404, render
|
||||||
|
|
||||||
from label.models import Artist, Release
|
from label.models import Artist, Release
|
||||||
|
@ -16,9 +18,12 @@ def artists(request):
|
||||||
|
|
||||||
def artist(request, slug):
|
def artist(request, slug):
|
||||||
artist = get_object_or_404(Artist, slug = slug)
|
artist = get_object_or_404(Artist, slug = slug)
|
||||||
|
artist.description = markdown.markdown(artist.description)
|
||||||
|
|
||||||
releases = artist.release_set.all()
|
releases = artist.release_set.all()
|
||||||
for release in releases:
|
for release in releases:
|
||||||
release.tag = tools.get_catalog_tag_from_id(release.ident)
|
release.tag = tools.get_catalog_tag_from_id(release.ident)
|
||||||
|
|
||||||
context = { "artist": artist, "releases": releases }
|
context = { "artist": artist, "releases": releases }
|
||||||
return render(request, "label/artist.html", context)
|
return render(request, "label/artist.html", context)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue