使用Django CKeditor,如何在不同的字段上加载不同的工具栏?

使用Django CKeditor,如何在不同的字段上加载不同的工具栏?,django,ckeditor,django-ckeditor,Django,Ckeditor,Django Ckeditor,我正在使用django CKeditor插件。我的配置如下: CKEDITOR_CONFIGS = { 'default': { 'skin': 'moono', #'office2013' 'toolbar': 'Custom', #selects from below 'toolbar_Custom': [ ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript'] ], 'toolbar_

我正在使用django CKeditor插件。我的配置如下:

CKEDITOR_CONFIGS = {
'default': {
    'skin': 'moono', #'office2013'
    'toolbar': 'Custom', #selects from below
    'toolbar_Custom': [
          ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript']
    ],
'toolbar_simple': {
    'skin': 'moono',
    'toolbar': 'Custom',
    'toolbar_Custom': [
         ['Bold', 'Italic', 'Underline'],
         ['NumberedList', 'BulletedList'],
    ],
},
'toolbar_basic':  {
    'toolbar': 'Basic'
},
'toolbar_full': {
    'toolbar': 'full',
},
}
我有时需要显示简单的工具栏,有时需要显示完整的工具栏。我该怎么做

我希望有这样的选择:

directions_car = RichTextField("Directions by car", max_length=1000, blank=False, default="", uses="toolbar_Custom")

您可以使用
config\u name
属性设置不同的工具栏

directions_car = RichTextField("Directions by car", max_length=1000, blank=False, default="", config_name="toolbar_Custom")

太好了,谢谢。我希望这也适用于表单,这样我就可以为管理员和前端定义一个不同的工具栏。