Changed charter member bios to HTML fields

This commit is contained in:
Zakary Timson 2018-01-12 01:54:50 -05:00
parent 57c98fdebb
commit d0fcb55c3f
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
from django.conf import settings from django.conf import settings
from django.db import models from django.db import models
from tinymce import HTMLField
class Position(models.Model): class Position(models.Model):
position_name = models.CharField(max_length=50) position_name = models.CharField(max_length=50)
@ -10,7 +12,7 @@ class Position(models.Model):
class Attorney(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) email = models.CharField(max_length=255, blank=True, null=True)
front_page = models.BooleanField(default=False) front_page = models.BooleanField(default=False)
image = models.ImageField(upload_to='portraits', default='portraits/silhouette.png') image = models.ImageField(upload_to='portraits', default='portraits/silhouette.png')

View File

@ -15,7 +15,7 @@
<div class="col-lg-6 pt-3 bg-light-blue"> <div class="col-lg-6 pt-3 bg-light-blue">
<div class="col-lg-6"> <div class="col-lg-6">
<h2 class="d-none d-lg-inline text-dark-primary">{{ attorney.name }}</h2> <h2 class="d-none d-lg-inline text-dark-primary">{{ attorney.name }}</h2>
<p>{{ attorney.biography | linebreaks }}</p> <p>{{ attorney.biography | safe }}</p>
</div> </div>
</div> </div>
</div> </div>