<s> from __future__ import unicode_literals <EOL> from cms . plugin_pool import plugin_pool <EOL> from cms . plugin_base import CMSPluginBase <EOL> from django . templatetags . static import static <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from cmsplugin_filer_video import settings <EOL> from cmsplugin_filer_video . models import FilerVideo <EOL> from cmsplugin_filer_video . forms import VideoForm <EOL> class FilerVideoPlugin ( CMSPluginBase ) : <EOL> module = '<STR_LIT>' <EOL> model = FilerVideo <EOL> name = _ ( "<STR_LIT>" ) <EOL> form = VideoForm <EOL> render_template = "<STR_LIT>" <EOL> text_enabled = True <EOL> general_fields = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT:image>' , <EOL> ( '<STR_LIT:width>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> color_fields = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> fieldsets = [ <EOL> ( None , { <EOL> '<STR_LIT>' : general_fields , <EOL> } ) , <EOL> ] <EOL> if settings . VIDEO_PLUGIN_ENABLE_ADVANCED_SETTINGS : <EOL> fieldsets += [ <EOL> ( _ ( '<STR_LIT>' ) , { <EOL> '<STR_LIT>' : color_fields , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , ) , <EOL> } ) , <EOL> ] <EOL> def render ( self , context , instance , placeholder ) : <EOL> context . update ( { <EOL> '<STR_LIT:object>' : instance , <EOL> '<STR_LIT>' : placeholder , <EOL> } ) <EOL> return context <EOL> def icon_src ( self , instance ) : <EOL> return static ( "<STR_LIT>" % ( <NUM_LIT:32> , <NUM_LIT:32> , ) ) <EOL> plugin_pool . register_plugin ( FilerVideoPlugin ) </s>
