<s> from django import forms <EOL> from ckeditor . widgets import CKEditorWidget <EOL> from website . project . model import Comment <EOL> class EmailForm ( forms . Form ) : <EOL> author = forms . CharField ( label = '<STR_LIT>' , max_length = <NUM_LIT:100> ) <EOL> email = forms . ChoiceField ( label = '<STR_LIT>' ) <EOL> subject = forms . CharField ( label = '<STR_LIT>' , required = True ) <EOL> message = forms . CharField ( label = '<STR_LIT>' , required = True , <EOL> widget = CKEditorWidget ( ) ) <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> choices = kwargs . get ( '<STR_LIT>' , { } ) . get ( '<STR_LIT:email>' , [ ] ) <EOL> self . base_fields [ '<STR_LIT:email>' ] = forms . ChoiceField ( choices = choices ) <EOL> super ( EmailForm , self ) . __init__ ( * args , ** kwargs ) <EOL> class ConfirmForm ( forms . Form ) : <EOL> confirm = forms . ChoiceField ( <EOL> choices = [ ( Comment . SPAM , '<STR_LIT>' ) , ( Comment . HAM , '<STR_LIT>' ) ] , <EOL> widget = forms . RadioSelect ( ) , <EOL> ) </s>
