o
    =g                     @   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   ckeditor_standard_exampler   ckeditor_upload_example r   r   W/var/www/html/venv/lib/python3.10/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>   s    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   SUBWIDGET_SUFFIXESr   	CharFieldr   &ckeditor_standard_multi_widget_example$ckeditor_upload_multi_widget_exampler   r   r   r   r      s    
r   c                   @      e Zd ZG dd dZdS )ExampleModelFormc                   @      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&       r,   Nr   r   r   r,   r   r   r   r   r&   %       r&   c                   @   r%   )ExampleNonUploadModelFormc                   @   r'   )zExampleNonUploadModelForm.Metar(   N)r   r   r   r   r*   r+   r   r   r   r   r,   ,   r-   r,   Nr.   r   r   r   r   r0   +   r/   r0   c                       s*   e Zd ZG dd dZ fddZ  ZS ) ExampleModelOverriddenWidgetFormc                   @   r'   )z%ExampleModelOverriddenWidgetForm.Metar(   Nr)   r   r   r   r   r,   2   r-   r,   c                    s2   t  j|i | tdddgdgd| jd _d S )Nr   
somepluginanotherplugin)r2   z/static/path/to/someplugin/z	plugin.js)r   extra_pluginsexternal_plugin_resourcescontent)super__init__r   r+   r    )selfargskwargs	__class__r   r   r8   6   s   z)ExampleModelOverriddenWidgetForm.__init__)r   r   r   r,   r8   __classcell__r   r   r<   r   r1   1   s    r1   N)djangor   ckeditor.fieldsr   ckeditor.widgetsr   ckeditor_uploader.fieldsr   ckeditor_uploader.widgetsr   modelsr
   r   r   r   Formr   r   	ModelFormr&   r0   r1   r   r   r   r   <module>   s    