<s> """<STR_LIT>""" <EOL> from autocomplete_light . contrib . taggit_field import TaggitWidget <EOL> from django import forms <EOL> from open_connect . resources . models import Resource <EOL> class ResourceForm ( forms . ModelForm ) : <EOL> """<STR_LIT>""" <EOL> class Meta ( object ) : <EOL> """<STR_LIT>""" <EOL> model = Resource <EOL> widgets = { <EOL> '<STR_LIT>' : TaggitWidget ( <EOL> '<STR_LIT>' , attrs = { '<STR_LIT>' : "<STR_LIT>" } ) <EOL> } <EOL> attachment = forms . FileField ( widget = forms . FileInput ) <EOL> fields = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> def clean ( self ) : <EOL> """<STR_LIT>""" <EOL> attachment = self . cleaned_data . get ( '<STR_LIT>' ) <EOL> if attachment and len ( attachment . name ) > <NUM_LIT:200> : <EOL> self . _errors [ '<STR_LIT>' ] = self . error_class ( [ <EOL> '<STR_LIT>' ] ) <EOL> return self . cleaned_data </s>
