From 107ca64fd716e27af377fe1843fd272f25f27b80 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Tue, 23 May 2023 19:52:14 +0300 Subject: [PATCH] Update config.py --- django_editorjs_fields/config.py | 34 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/django_editorjs_fields/config.py b/django_editorjs_fields/config.py index e213ecd..a60e212 100644 --- a/django_editorjs_fields/config.py +++ b/django_editorjs_fields/config.py @@ -106,19 +106,21 @@ } ) -PLUGINS_KEYS = { - '@editorjs/image': 'Image', - '@editorjs/header': 'Header', - '@editorjs/checklist': 'Checklist', - '@editorjs/list': 'List', - '@editorjs/quote': 'Quote', - '@editorjs/raw': 'Raw', - '@editorjs/code': 'Code', - '@editorjs/inline-code': 'InlineCode', - '@editorjs/embed': 'Embed', - '@editorjs/delimiter': 'Delimiter', - '@editorjs/warning': 'Warning', - '@editorjs/link': 'LinkTool', - '@editorjs/marker': 'Marker', - '@editorjs/table': 'Table', -} +PLUGINS_KEYS = getattr( + settings, "EDITORJS_PLUGINS_KEYS", { + '@editorjs/image': 'Image', + '@editorjs/header': 'Header', + '@editorjs/checklist': 'Checklist', + '@editorjs/list': 'List', + '@editorjs/quote': 'Quote', + '@editorjs/raw': 'Raw', + '@editorjs/code': 'Code', + '@editorjs/inline-code': 'InlineCode', + '@editorjs/embed': 'Embed', + '@editorjs/delimiter': 'Delimiter', + '@editorjs/warning': 'Warning', + '@editorjs/link': 'LinkTool', + '@editorjs/marker': 'Marker', + '@editorjs/table': 'Table', + } +)