diff --git a/pgweb/featurematrix/migrations/0001_initial.py b/pgweb/featurematrix/migrations/0001_initial.py index a68e86ea..ec3ba814 100644 --- a/pgweb/featurematrix/migrations/0001_initial.py +++ b/pgweb/featurematrix/migrations/0001_initial.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('featurename', models.CharField(max_length=100)), - ('featuredescription', models.TextField(blank=True)), + ('featuredescription', models.TextField(blank=True, help_text="""Supports Markdown. A single, plain URL will link directly to that URL.""")), ('v74', models.IntegerField(default=0, verbose_name='7.4', choices=[(0, 'No'), (1, 'Yes'), (2, 'Obsolete'), (3, '?')])), ('v80', models.IntegerField(default=0, verbose_name='8.0', choices=[(0, 'No'), (1, 'Yes'), (2, 'Obsolete'), (3, '?')])), ('v81', models.IntegerField(default=0, verbose_name='8.1', choices=[(0, 'No'), (1, 'Yes'), (2, 'Obsolete'), (3, '?')])), diff --git a/pgweb/featurematrix/models.py b/pgweb/featurematrix/models.py index b2ae0063..982c8c58 100644 --- a/pgweb/featurematrix/models.py +++ b/pgweb/featurematrix/models.py @@ -27,7 +27,7 @@ class FeatureGroup(models.Model): class Feature(models.Model): group = models.ForeignKey(FeatureGroup, null=False, blank=False, on_delete=models.CASCADE) featurename = models.CharField(max_length=100, null=False, blank=False) - featuredescription = models.TextField(null=False, blank=True) + featuredescription = models.TextField(null=False, blank=True, help_text="""Supports Markdown. A plain URL will link directly to that URL.""") # WARNING! All fields that start with "v" will be considered versions! v74 = models.IntegerField(verbose_name="7.4", null=False, blank=False, default=0, choices=choices) v74.visible_default = False diff --git a/templates/featurematrix/featuredetail.html b/templates/featurematrix/featuredetail.html index e3716ed7..8472277b 100644 --- a/templates/featurematrix/featuredetail.html +++ b/templates/featurematrix/featuredetail.html @@ -1,9 +1,10 @@ {%extends "base/page.html"%} +{% load markup %} {%block title%}Feature Description{%endblock%} {%block contents%}
-{{feature.featuredescription}} +{{feature.featuredescription|markdown:"safe"}}
{%endblock%}