Adds support for enabling custom tinymce plugins in Studio's HTML editor (#25695)
This commit is contained in:
@@ -11,6 +11,8 @@ django-extensions that we were actually using.
|
||||
"""
|
||||
|
||||
|
||||
import json
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
@@ -27,10 +29,23 @@ class Command(BaseCommand):
|
||||
help='Specifies the list of settings to be printed.'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--json',
|
||||
action='store_true',
|
||||
help='Returns setting as JSON string instead.',
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
settings_to_print = options.get('settings_to_print')
|
||||
dump_as_json = options.get('json')
|
||||
|
||||
for setting in settings_to_print:
|
||||
if not hasattr(settings, setting):
|
||||
raise CommandError('%s not found in settings.' % setting)
|
||||
print(getattr(settings, setting))
|
||||
|
||||
setting_value = getattr(settings, setting)
|
||||
|
||||
if dump_as_json:
|
||||
setting_value = json.dumps(setting_value, sort_keys=True)
|
||||
|
||||
print(setting_value)
|
||||
|
||||
Reference in New Issue
Block a user