summaryrefslogtreecommitdiff
path: root/releng
diff options
context:
space:
mode:
Diffstat (limited to 'releng')
-rw-r--r--releng/models.py6
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,