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)