From d0fcb55c3f9f5483ea724225c2b8cb51ec72b261 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Fri, 12 Jan 2018 01:54:50 -0500 Subject: [PATCH] Changed charter member bios to HTML fields --- charter_members/models.py | 4 +++- charter_members/templates/attorney.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charter_members/models.py b/charter_members/models.py index 0e6a52d..4505393 100644 --- a/charter_members/models.py +++ b/charter_members/models.py @@ -1,6 +1,8 @@ from django.conf import settings from django.db import models +from tinymce import HTMLField + class Position(models.Model): position_name = models.CharField(max_length=50) @@ -10,7 +12,7 @@ class Position(models.Model): class Attorney(models.Model): - biography = models.TextField(blank=True, null=True) + biography = HTMLField(blank=True, null=True) email = models.CharField(max_length=255, blank=True, null=True) front_page = models.BooleanField(default=False) image = models.ImageField(upload_to='portraits', default='portraits/silhouette.png') diff --git a/charter_members/templates/attorney.html b/charter_members/templates/attorney.html index c73e149..e2e936f 100644 --- a/charter_members/templates/attorney.html +++ b/charter_members/templates/attorney.html @@ -15,7 +15,7 @@

{{ attorney.name }}

-

{{ attorney.biography | linebreaks }}

+

{{ attorney.biography | safe }}