diff options
author | Dan McGee <dan@archlinux.org> | 2012-11-21 00:10:12 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-11-21 00:10:12 -0500 |
commit | c81a9271b8bbc03418442c01d50a4c4945999e71 (patch) | |
tree | 464448fd81e11ea57d978c51ef8e7d0afd183323 /releng | |
parent | 402487b007e206b013ecbf8b3017dc1231f4bbbc (diff) |
Show release notes on downloads page
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'releng')
-rw-r--r-- | releng/models.py | 6 |
1 files changed, 6 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, |