<s> import floppyforms as forms <EOL> import datetime <EOL> from django . conf import settings <EOL> from django . contrib . staticfiles . templatetags . staticfiles import static <EOL> from tinymce . widgets import TinyMCE <EOL> class DatePicker ( forms . TextInput ) : <EOL> template_name = '<STR_LIT>' <EOL> format = "<STR_LIT>" <EOL> def render ( self , name , value , attrs = None ) : <EOL> if isinstance ( value , datetime . date ) : <EOL> value = value . strftime ( self . format ) <EOL> return super ( DatePicker , self ) . render ( name , value , attrs ) <EOL> class Media : <EOL> css = { <EOL> '<STR_LIT:all>' : ( '<STR_LIT>' , ) <EOL> } <EOL> class DateTimePicker ( forms . TextInput ) : <EOL> template_name = '<STR_LIT>' <EOL> format = "<STR_LIT>" <EOL> def render ( self , name , value , attrs = None ) : <EOL> if isinstance ( value , datetime . datetime ) : <EOL> value = value . strftime ( self . format ) <EOL> return super ( DateTimePicker , self ) . render ( name , value , attrs ) <EOL> class Media : <EOL> css = { <EOL> '<STR_LIT:all>' : ( '<STR_LIT>' , ) <EOL> } <EOL> class SlugWidget ( forms . widgets . SlugInput ) : <EOL> template_name = '<STR_LIT>' <EOL> def __init__ ( self , prepopulated_from , attrs = None ) : <EOL> self . prepopulated_from = prepopulated_from <EOL> super ( SlugWidget , self ) . __init__ ( attrs ) <EOL> def get_context_data ( self ) : <EOL> context = super ( SlugWidget , self ) . get_context_data ( ) <EOL> context [ '<STR_LIT>' ] = '<STR_LIT>' % self . prepopulated_from <EOL> return context <EOL> class Media : <EOL> js = ( '<STR_LIT>' , ) <EOL> class TinyMCELargeTable ( TinyMCE ) : <EOL> def render ( self , name , value , attrs = None ) : <EOL> return u'<STR_LIT>' % super ( TinyMCELargeTable , self ) . render ( name , value , attrs ) <EOL> class TinyMCESimple ( TinyMCE ) : <EOL> def __init__ ( self , content_language = None , attrs = None , mce_attrs = None ) : <EOL> compiled_attrs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> if attrs is not None : <EOL> compiled_attrs . update ( attrs ) <EOL> super ( TinyMCE , self ) . __init__ ( compiled_attrs ) <EOL> if mce_attrs is None : <EOL> mce_attrs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> self . mce_attrs = mce_attrs <EOL> if content_language is None : <EOL> content_language = mce_attrs . get ( '<STR_LIT>' , None ) <EOL> self . content_language = content_language <EOL> class Slider ( forms . RangeInput ) : <EOL> min = <NUM_LIT:1> <EOL> max = <NUM_LIT> <EOL> step = <NUM_LIT:1> <EOL> template_name = '<STR_LIT>' <EOL> class Media : <EOL> css = { <EOL> '<STR_LIT:all>' : ( <EOL> '<STR_LIT>' , <EOL> ) <EOL> } <EOL> class TemplateThemeSelectWidget ( forms . widgets . RadioSelect ) : <EOL> template_name = '<STR_LIT>' </s>
