summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-11-21 00:10:12 -0500
committerDan McGee <dan@archlinux.org>2012-11-21 00:10:12 -0500
commitc81a9271b8bbc03418442c01d50a4c4945999e71 (patch)
tree464448fd81e11ea57d978c51ef8e7d0afd183323
parent402487b007e206b013ecbf8b3017dc1231f4bbbc (diff)
Show release notes on downloads page
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--releng/models.py6
-rw-r--r--templates/public/download.html6
2 files changed, 12 insertions, 0 deletions
diff --git a/releng/models.py b/releng/models.py
index c591bc0f..b3ab1a31 100644
--- a/releng/models.py
+++ b/releng/models.py
@@ -1,8 +1,10 @@
+import markdown
from urllib import urlencode
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models.signals import pre_save
+from django.utils.safestring import mark_safe
from main.utils import set_created_field
@@ -139,6 +141,10 @@ class Release(models.Model):
query['xt'] = "urn:btih:%s" % self.torrent_infohash
return "magnet:?%s" % urlencode(query, doseq=True)
+ def info_html(self):
+ return mark_safe(markdown.markdown(
+ self.info, safe_mode=True, enable_attributes=False))
+
for model in (Iso, Test, Release):
pre_save.connect(set_created_field, sender=model,
diff --git a/templates/public/download.html b/templates/public/download.html
index 5733ee94..5f6f2d02 100644
--- a/templates/public/download.html
+++ b/templates/public/download.html
@@ -32,6 +32,12 @@
</li>
</ul>
+ {% if release.info %}
+ <h3>Release Notes</h3>
+
+ <div class="article-content">{{ release.info_html }}</div>
+ {% endif %}
+
<h3>Existing Arch Users</h3>
<p>If you are an existing Arch user, there is no need to download a new ISO