U
    "5øi’  ã                   @   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   úH/tmp/pip-unpacked-wheel-j53lzkjl/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   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                    s.   t ƒ j||Ž 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   r/   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   