Updated forum modal to use HTML fields
This commit is contained in:
parent
cce204b1fc
commit
71eaabda58
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user