用于前端模板的简单(丰富)内容块。使用管理工具。
django-richcontentblocks的Python项目详细描述
===
django richcontentblocks
=
django项目中使用的非常简单的类似cms的内容块。
功能:
1.用于创建/管理内容块的管理界面(包括富文本编辑器)
2。用于检索/显示django项目模板中内容块的模板标记。如果可能的话,在加载内容块时会利用Django缓存。
灵感和更全面的功能版本:Django-tinycontent_
installation
--
运行:``pip install Django RichContentBlocks`
quick start
--
1。按照ckeditor的配置说明操作(如果已经配置了ckeditor,请跳过此步骤)。
2。运行迁移:
manage.py migrate
>3。将“rich content”添加到已安装的应用程序设置中,如下所示:
模板中的关键字值为“my block”:
{%load rich_content_block_tags%}
<;div>;
内容块将位于下一个div
<;div>;
{%rich_content_block'my block'%}
<;div>;
它将被放在缓存中。随后加载的内容块将使用缓存项。
如果尝试加载内容对象时使用了无效的内容块键,则会显示错误消息。
。_ ckeditor:https://github.com/django ckeditor/django ckeditor
。_ django-tinycontent:https://github.com/dominicrodger/django-tinycontent
django richcontentblocks
=
django项目中使用的非常简单的类似cms的内容块。
功能:
1.用于创建/管理内容块的管理界面(包括富文本编辑器)
2。用于检索/显示django项目模板中内容块的模板标记。如果可能的话,在加载内容块时会利用Django缓存。
灵感和更全面的功能版本:Django-tinycontent_
installation
--
运行:``pip install Django RichContentBlocks`
quick start
--
1。按照ckeditor的配置说明操作(如果已经配置了ckeditor,请跳过此步骤)。
2。运行迁移:
manage.py migrate
>3。将“rich content”添加到已安装的应用程序设置中,如下所示:
模板中的关键字值为“my block”:
{%load rich_content_block_tags%}
<;div>;
内容块将位于下一个div
<;div>;
{%rich_content_block'my block'%}
<;div>;
它将被放在缓存中。随后加载的内容块将使用缓存项。
如果尝试加载内容对象时使用了无效的内容块键,则会显示错误消息。
。_ ckeditor:https://github.com/django ckeditor/django ckeditor
。_ django-tinycontent:https://github.com/dominicrodger/django-tinycontent