uninstall djangocms-style 2.0.2

This commit is contained in:
2018-03-15 11:25:36 +00:00
parent cd7f0e2bd5
commit 29e19deebc
5 changed files with 0 additions and 56 deletions

View File

@@ -1,6 +0,0 @@
{
"installed-apps": [
"djangocms_style"
],
"package-name": "djangocms-style"
}

View File

@@ -1,43 +0,0 @@
# -*- coding: utf-8 -*-
from aldryn_client import forms
def split_and_strip(string):
return [item.strip() for item in string.split(',') if item]
class Form(forms.BaseForm):
templates = forms.CharField(
'List of additional templates (comma separated)',
required=False,
)
class_names = forms.CharField(
'List of classes (comma separated)',
required=False,
)
tag_types = forms.CharField(
'List of HTML tags (comma separated)',
required=False,
)
def clean(self):
data = super(Form, self).clean()
# prettify
data['templates'] = ', '.join(split_and_strip(data['templates']))
data['class_names'] = ', '.join(split_and_strip(data['class_names']))
data['tag_types'] = ', '.join(split_and_strip(data['tag_types']))
return data
def to_settings(self, data, settings):
if data['templates']:
settings['DJANGOCMS_STYLE_TEMPLATES'] = [
(item, item)
for item in split_and_strip(data['templates'])
]
if data['class_names']:
settings['DJANGOCMS_STYLE_CHOICES'] = split_and_strip(data['class_names'])
if data['tag_types']:
settings['DJANGOCMS_STYLE_TAGS'] = split_and_strip(data['tag_types'])
return settings

View File

@@ -1,5 +0,0 @@
{
"class_names": null,
"tag_types": null,
"templates": null
}