a
    9Xh                     @   s   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 ddl
mZmZ ddlmZ G d	d
 d
ejZG dd dejZG dd dejZG dd dejZG dd dejZdS )    )forms)RichTextFormFieldCKEditorWidget)RichTextUploadingFormFieldCKEditorUploadingWidget   )ExampleModelExampleNonUploadModel)CkEditorMultiWidgetc                   @   s   e Zd Ze ZeddZdS )CkEditorFormmy-custom-toolbarconfig_nameN)__name__
__module____qualname__r   Zckeditor_standard_exampler   Zckeditor_upload_example r   r   i/var/www/viveiro_mudafortebrasil/venv/lib/python3.9/site-packages/ckeditor_demo/demo_application/forms.pyr      s   r   c                   @   sL   e Zd ZddgZejedd eD ddZejedd eD ddZdS )	CkEditorMultiWidgetForm01c                 C   s   i | ]
}|t qS r   r   .0suffixr   r   r   
<dictcomp>       z"CkEditorMultiWidgetForm.<dictcomp>)widgets)widgetc                 C   s   i | ]}|t d dqS )r   r   r   r   r   r   r   r      s   N)	r   r   r   ZSUBWIDGET_SUFFIXESr   Z	CharFieldr   Z&ckeditor_standard_multi_widget_exampleZ$ckeditor_upload_multi_widget_exampler   r   r   r   r      s   r   c                   @   s   e Zd ZG dd dZdS )ExampleModelFormc                   @   s   e Zd ZeZdZdS )zExampleModelForm.Meta__all__Nr   r   r   r
   modelfieldsr   r   r   r   Meta&   s   r%   Nr   r   r   r%   r   r   r   r   r    %   s   r    c                   @   s   e Zd ZG dd dZdS )ExampleNonUploadModelFormc                   @   s   e Zd ZeZdZdS )zExampleNonUploadModelForm.Metar!   N)r   r   r   r   r#   r$   r   r   r   r   r%   ,   s   r%   Nr&   r   r   r   r   r'   +   s   r'   c                       s*   e Zd ZG dd dZ fddZ  ZS ) ExampleModelOverriddenWidgetFormc                   @   s   e Zd ZeZdZdS )z%ExampleModelOverriddenWidgetForm.Metar!   Nr"   r   r   r   r   r%   2   s   r%   c                    s2   t  j|i | tdddgdgd| jd _d S )Nr   
somepluginZanotherplugin)r)   z/static/path/to/someplugin/z	plugin.js)r   Zextra_pluginsZexternal_plugin_resourcescontent)super__init__r   r$   r   )selfargskwargs	__class__r   r   r,   6   s    z)ExampleModelOverriddenWidgetForm.__init__)r   r   r   r%   r,   __classcell__r   r   r0   r   r(   1   s   r(   N)Zdjangor   Zckeditor.fieldsr   Zckeditor.widgetsr   Zckeditor_uploader.fieldsr   Zckeditor_uploader.widgetsr   modelsr
   r   r   r   ZFormr   r   Z	ModelFormr    r'   r(   r   r   r   r   <module>   s   