#NEWLINE# def clean( self ) : #NEWLINE# #INDENT# if ( not self . instance . pk ) : #NEWLINE# #INDENT# if ( ( self . poll_form_set . total_form_count ( ) < 2 ) or ( not self . poll_form_set . is_valid ( ) ) ) : #NEWLINE# #INDENT# raise forms . ValidationError ( _ ( 'You must specify at least two choices' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for form in self . poll_form_set . forms : #NEWLINE# #INDENT# if ( not self [ 'choice' ] . data ) : #NEWLINE# #INDENT# raise forms . ValidationError ( _ ( 'You must specify at least two choices' ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return self . cleaned_data