install djangocms-snippet 2.0.0
parent
37622bef60
commit
116d2c92d0
@ -0,0 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_snippet"
|
||||
],
|
||||
"package-name": "djangocms-snippet"
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_client import forms
|
||||
|
||||
|
||||
class Form(forms.BaseForm):
|
||||
editor_theme = forms.CharField(
|
||||
'Custom editor theme, (e.g. "twilight", default: "github")',
|
||||
required=False,
|
||||
)
|
||||
editor_mode = forms.CharField(
|
||||
'Custom editor mode (e.g. "javascript", default: "html")',
|
||||
required=False,
|
||||
)
|
||||
enable_search = forms.CheckboxField(
|
||||
'Enable snippet content to be searchable.',
|
||||
required=False,
|
||||
initial=False,
|
||||
)
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
if data['editor_theme']:
|
||||
settings['DJANGOCMS_SNIPPET_THEME'] = data['editor_theme']
|
||||
if data['editor_mode']:
|
||||
settings['DJANGOCMS_SNIPPET_MODE'] = data['editor_mode']
|
||||
if data['enable_search']:
|
||||
settings['DJANGOCMS_SNIPPET_SEARCH'] = data['enable_search']
|
||||
return settings
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"editor_mode": null,
|
||||
"editor_theme": null,
|
||||
"enable_search": false
|
||||
}
|
||||
Loading…
Reference in New Issue