RichTextField used to edit announce content
This commit is contained in:
parent
700b2afb0a
commit
f6b8df5f74
|
@ -3,6 +3,8 @@ from django.conf import settings
|
|||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from ckeditor.fields import RichTextField
|
||||
|
||||
class Category(models.Model):
|
||||
name = models.CharField(max_length=64, blank=False, null=False)
|
||||
ctime = models.DateTimeField(auto_now_add=True)
|
||||
|
@ -13,7 +15,7 @@ class Category(models.Model):
|
|||
class Announce(models.Model):
|
||||
title = models.CharField(_('title'), max_length=256,
|
||||
help_text=_('maximum 256 characters'))
|
||||
text = models.TextField(_('text'))
|
||||
text = RichTextField(_('Content'))
|
||||
publication_time = models.DateTimeField(_('publication time'), blank=True,
|
||||
null=True, default=timezone.now)
|
||||
expiration_time = models.DateTimeField(_('expiration time'), blank=True,
|
||||
|
|
Reference in New Issue