From dcb1c878eefd0fc490e8df6da7419323787914fe Mon Sep 17 00:00:00 2001 From: Matthew Duck Date: Fri, 13 Feb 2015 08:29:58 +0000 Subject: [PATCH] Make widget respect the documented settings The documented settings variables FROALA_EDITOR_THEME and FROALA_INCLUDE_JQUERY are currently adhered to by FroalaField but not by the FroalaEditor widget. --- froala_editor/widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/froala_editor/widgets.py b/froala_editor/widgets.py index a84f992d..b799f820 100644 --- a/froala_editor/widgets.py +++ b/froala_editor/widgets.py @@ -12,8 +12,8 @@ def __init__(self, *args, **kwargs): 'font_size', 'font_family', 'colors', 'block_styles', 'video', 'tables', 'media_manager', 'lists', 'file_upload' ))) - self.theme = kwargs.pop('theme', None) - self.include_jquery = kwargs.pop('include_jquery', True) + self.theme = kwargs.pop('theme', getattr(settings, 'FROALA_EDITOR_THEME', None)) + self.include_jquery = kwargs.pop('include_jquery', getattr(settings, 'FROALA_INCLUDE_JQUERY', True)) self.image_upload = kwargs.pop('image_upload', True) self.file_upload = kwargs.pop('file_upload', True) super(FroalaEditor, self).__init__(*args, **kwargs)