From 71eaabda58b45b43f67e808f653ad7a01ed5f868 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Sat, 6 Jan 2018 12:11:27 -0500 Subject: [PATCH] Updated forum modal to use HTML fields --- forum/models.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/forum/models.py b/forum/models.py index 9b92a3f..1452d58 100644 --- a/forum/models.py +++ b/forum/models.py @@ -1,6 +1,8 @@ from django.db import models from django.contrib.auth.models import User +from tinymce.models import HTMLField + class Thread(models.Model): topic = models.CharField(max_length=255) @@ -10,11 +12,12 @@ class Thread(models.Model): class Post(models.Model): - topic = models.ForeignKey(Thread) - title = models.CharField(max_length=255) - question = models.TextField() creator = models.ForeignKey(User) created = models.DateTimeField(auto_now_add=True) + resolved = models.BooleanField(default=False) + topic = models.ForeignKey(Thread) + title = models.CharField(max_length=255) + question = HTMLField() def __str__(self): return self.title @@ -22,7 +25,7 @@ class Post(models.Model): class Comment(models.Model): post = models.ForeignKey(Post) - reply = models.TextField() + reply = HTMLField() creator = models.ForeignKey(User) created = models.DateTimeField(auto_now_add=True)