首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在django模型中集成了ckeditor,但是当从ckeditor django管理面板保存数据时,它没有保存到数据库中,显示为空白。

在django模型中集成了ckeditor,但是当从ckeditor django管理面板保存数据时,它没有保存到数据库中,显示为空白。
EN

Stack Overflow用户
提问于 2022-06-09 15:30:45
回答 1查看 39关注 0票数 0

I正在使用来自ckeditor.fields导入RichTextField的RichText字段

代码语言:javascript
复制
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()
EN

回答 1

Stack Overflow用户

发布于 2022-06-10 07:27:53

我在我的项目静态文件夹中有旧的ckeditor和django的管理静态文件,我从虚拟env获取更新的静态文件,并将其保存在我的静态文件夹中,因此它工作了!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72563008

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档