# Path: djedi/plugins/form.py
# class FormsBasePlugin(DjediPlugin):
#     ext = None
# 
#     @property
#     def forms(self):
#         return {}
# 
#     def get_editor_context(self, **context):
#         context.update(
#             {"forms": {
#                 tab: form()
#                 for tab, form in self.forms.items()
#             }}
#         )
# 
#         return context
# 
#     def save(self, data, dumps=True):
#         data = self.collect_forms_data(data)
#         return json.dumps(data) if dumps else data
# 
#     def collect_forms_data(self, data):
#         return {
#             deprefix(field): data.get(deprefix(field))
#             for tab, form in self.forms.items()
#             for field in form.base_fields.keys()
#         }
# 
# class BaseEditorForm(forms.Form):
#     def __init__(self, *args, **kwargs):
#         super(BaseEditorForm, self).__init__(*args, **kwargs)
# 
#         for field in list(self.fields.keys()):
#             self.fields[field].widget.__class__ = get_custom_render_widget(
#                 self.fields[field].widget.__class__
#             )


import json
import six
from django.utils.html import escape
from django.core.files.uploadedfile import InMemoryUploadedFile
from django import forms
from hashlib import sha1
from os import path
from .form import FormsBasePlugin, BaseEditorForm
        from PIL import Image
            from django.core.files.storage import default_storage as file_storage



class DataForm(BaseEditorForm):
    data__id = forms.CharField(
        label="ID",
        max_length=255,
        required=False,
        widget=forms.TextInput(attrs={"class": "form-control"}),
    )

    data__alt = forms.CharField(
        label="Alt text",
        max_length=255,
        required=False,
        widget=forms.TextInput(attrs={"class": "form-control"}),
    )

    data__class = forms.CharField(
        label="Class",
        max_length=255,
        required=False,
        widget=forms.TextInput(attrs={"class": "form-control"}),
    )



# Path: djedi/plugins/form.py
# class FormsBasePlugin(DjediPlugin):
#     ext = None
# 
#     @property
#     def forms(self):
#         return {}
# 
#     def get_editor_context(self, **context):
#         context.update(
#             {"forms": {
#                 tab: form()
#                 for tab, form in self.forms.items()
#             }}
#         )
# 
#         return context
# 
#     def save(self, data, dumps=True):
#         data = self.collect_forms_data(data)
#         return json.dumps(data) if dumps else data
# 
#     def collect_forms_data(self, data):
#         return {
#             deprefix(field): data.get(deprefix(field))
#             for tab, form in self.forms.items()
#             for field in form.base_fields.keys()
#         }
# 
# class BaseEditorForm(forms.Form):
#     def __init__(self, *args, **kwargs):
#         super(BaseEditorForm, self).__init__(*args, **kwargs)
# 
#         for field in list(self.fields.keys()):
#             self.fields[field].widget.__class__ = get_custom_render_widget(
#                 self.fields[field].widget.__class__
#             )


# Path: djedi/plugins/img.py
import json
import six
from django.utils.html import escape
from django.core.files.uploadedfile import InMemoryUploadedFile
from django import forms
from hashlib import sha1
from os import path
from .form import FormsBasePlugin, BaseEditorForm
        from PIL import Image
            from django.core.files.storage import default_storage as file_storage




class DataForm(BaseEditorForm):
    data__id = forms.CharField(
        label="ID",
        max_length=255,
        required=False,
        widget=forms.TextInput(attrs={"class": "form-control"}),
    )

    data__alt = forms.CharField(
        label="Alt text",
        max_length=255,
        required=False,
        widget=forms.TextInput(attrs={"class": "form-control"}),
    )

    data__class = forms.CharField(
        label="Class",
        max_length=255,
        required=False,
        widget=forms.TextInput(attrs={"class": "form-control"}),
    )



class ImagePluginBase(FormsBasePlugin):