
I正在使用来自ckeditor.fields导入RichTextField的RichText字段
class Section(BaseContent):
image = ImageWithThumbsField(upload_to='static/%Y/%m/%d', sizes=((90,120),(180,240),(360,480)),blank=True, null=True )
# image = ImageWithThumbsField(upload_to='static/%Y/%m/%d',blank=True, null=True )
description = RichTextField("Section description. Appears in section home page", blank=True, null=True)
url4SEO = models.SlugField("SEO friendly url, use only aplhabets and hyphen", max_length=60)
summary = models.CharField("Byline/ Summary", max_length=300, blank=True, null=True)
css = models.CharField("Section specific CSS", max_length=300, blank=True, null=True)
allowContent = models.BooleanField("Should this section allow any content(such as News and Event)?", default=True)
parent = models.ForeignKey('self', blank=True, null=True,on_delete=models.DO_NOTHING)
home_disp = models.BooleanField(default = False)
sub_description=RichTextField("Section sub description. Appears in section portfolio page", blank=True, null=True)
sub_image=ImageWithThumbsField(upload_to='static/%Y/%m/%d', sizes=((90,120),(180,240),(360,480)),blank=True, null=True )
# sub_image=ImageWithThumbsField(upload_to='static/%Y/%m/%d',blank=True, null=True )
is_active = models.BooleanField()发布于 2022-06-10 07:27:53
我在我的项目静态文件夹中有旧的ckeditor和django的管理静态文件,我从虚拟env获取更新的静态文件,并将其保存在我的静态文件夹中,因此它工作了!
https://stackoverflow.com/questions/72563008
复制相似问题