diff options
author | luxagraf <sng@luxagraf.net> | 2019-04-14 13:57:23 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-04-14 13:57:23 -0500 |
commit | 38122e0102e7a03c47575342e5edb75c15912fef (patch) | |
tree | 4544f1507159cb6770db3f25f2b227859bfd5151 /app/essays | |
parent | 471498bafcfa2e7d2d00e0672b83c7ad41edb557 (diff) |
added html to preamble
Diffstat (limited to 'app/essays')
-rw-r--r-- | app/essays/migrations/0007_auto_20190414_1455.py | 18 | ||||
-rw-r--r-- | app/essays/models.py | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/app/essays/migrations/0007_auto_20190414_1455.py b/app/essays/migrations/0007_auto_20190414_1455.py new file mode 100644 index 0000000..a5242cb --- /dev/null +++ b/app/essays/migrations/0007_auto_20190414_1455.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.7 on 2019-04-14 14:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('essays', '0006_auto_20190303_1625'), + ] + + operations = [ + migrations.AddField( + model_name='essay', + name='preamble_html', + field=models.TextField(blank=True), + ), + ] diff --git a/app/essays/models.py b/app/essays/models.py index 5a29667..c75f72d 100644 --- a/app/essays/models.py +++ b/app/essays/models.py @@ -25,6 +25,7 @@ class Essay(models.Model): sub_title = models.CharField(max_length=200, blank=True) dek = models.TextField(blank=True) preamble = models.TextField(blank=True) + preamble_html = models.TextField(blank=True) slug = models.SlugField(unique_for_date='pub_date') body_html = models.TextField(blank=True) body_markdown = models.TextField() @@ -74,6 +75,7 @@ class Essay(models.Model): md = render_images(self.body_markdown) self.body_html = markdown_to_html(md) self.afterword_html = markdown_to_html(self.afterword) + self.preamble_html = markdown_to_html(self.preamble) super(Essay, self).save() |