Changed form modal to use ckeditor

This commit is contained in:
Zakary Timson 2017-10-24 00:57:33 -04:00
parent efc1ae42a6
commit c8360c293d

View File

@ -1,6 +1,8 @@
from django.db import models from django.db import models
from django.contrib.auth.models import User from django.contrib.auth.models import User
from ckeditor_uploader.fields import RichTextUploadingField
class Thread(models.Model): class Thread(models.Model):
topic = models.CharField(max_length=255) topic = models.CharField(max_length=255)
@ -12,7 +14,7 @@ class Thread(models.Model):
class Post(models.Model): class Post(models.Model):
topic = models.ForeignKey(Thread) topic = models.ForeignKey(Thread)
title = models.CharField(max_length=255) title = models.CharField(max_length=255)
question = models.TextField() question = RichTextUploadingField()
creator = models.ForeignKey(User) creator = models.ForeignKey(User)
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)
@ -22,7 +24,7 @@ class Post(models.Model):
class Comment(models.Model): class Comment(models.Model):
post = models.ForeignKey(Post) post = models.ForeignKey(Post)
reply = models.TextField() reply = RichTextUploadingField()
creator = models.ForeignKey(User) creator = models.ForeignKey(User)
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)