
    cf                        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
ej                  Z G d dej                  Z G d dej                  Z G d dej                  Z G d dej                  ZdS )    )forms)RichTextFormFieldCKEditorWidget)RichTextUploadingFormFieldCKEditorUploadingWidget   )ExampleModelExampleNonUploadModel)CkEditorMultiWidgetc                   :    e Zd Z e            Z ed          ZdS )CkEditorFormmy-custom-toolbarconfig_nameN)__name__
__module____qualname__r   ckeditor_standard_exampler   ckeditor_upload_example     V/var/www/html/env/lib/python3.11/site-packages/ckeditor_demo/demo_application/forms.pyr   r      s:         1 1 3 388'  r   r   c                       e Zd ZddgZ ej         ed eD                                 Z ej         ed eD                                 ZdS )CkEditorMultiWidgetForm01c                     i | ]
}|t           S r   r   .0suffixs     r   
<dictcomp>z"CkEditorMultiWidgetForm.<dictcomp>   s    MMMV^MMMr   )widgets)widgetc                 0    i | ]}|t          d           S )r   r   r   r    s     r   r#   z"CkEditorMultiWidgetForm.<dictcomp>   s7        /<OPPP  r   N)	r   r   r   SUBWIDGET_SUFFIXESr   	CharFieldr   &ckeditor_standard_multi_widget_example$ckeditor_upload_multi_widget_exampler   r   r   r   r      s        s-<U_""MM:LMMM
 
 
. . .*
 ,;5?"" 0  
 
 
, , ,(((r   r   c                   (    e Zd Z G d d          ZdS )ExampleModelFormc                       e Zd ZeZdZdS )ExampleModelForm.Meta__all__Nr   r   r   r   modelfieldsr   r   r   Metar.   &           r   r3   Nr   r   r   r3   r   r   r   r,   r,   %   <                 r   r,   c                   (    e Zd Z G d d          ZdS )ExampleNonUploadModelFormc                       e Zd ZeZdZdS )ExampleNonUploadModelForm.Metar/   N)r   r   r   r   r1   r2   r   r   r   r3   r:   ,   s        %r   r3   Nr5   r   r   r   r8   r8   +   r6   r   r8   c                   8     e Zd Z G d d          Z fdZ xZS ) ExampleModelOverriddenWidgetFormc                       e Zd ZeZdZdS )%ExampleModelOverriddenWidgetForm.Metar/   Nr0   r   r   r   r3   r>   2   r4   r   r3   c                      t                      j        |i | t          dddgdg          | j        d         _        d S )Nr   
somepluginanotherplugin)r@   z/static/path/to/someplugin/z	plugin.js)r   extra_pluginsexternal_plugin_resourcescontent)super__init__r	   r2   r%   )selfargskwargs	__class__s      r   rF   z)ExampleModelOverriddenWidgetForm.__init__6   sX    $)&)))(?+'9'
)
 
)
 
)
I%%%r   )r   r   r   r3   rF   __classcell__)rJ   s   @r   r<   r<   1   s`               
 
 
 
 
 
 
 
 
r   r<   N)djangor   ckeditor.fieldsr   ckeditor.widgetsr   ckeditor_uploader.fieldsr   ckeditor_uploader.widgetsr	   modelsr   r   r$   r   Formr   r   	ModelFormr,   r8   r<   r   r   r   <module>rT      so         - - - - - - + + + + + + ? ? ? ? ? ? = = = = = = 7 7 7 7 7 7 7 7 ( ( ( ( ( (    5:       ej   $    u          
 
 
 
 
u 
 
 
 
 
r   