#NEWLINE# def clean_amount( self ) : #NEWLINE# #INDENT# amount = self . cleaned_data . get ( 'amount' ) #NEWLINE# if amount : #NEWLINE# #INDENT# exponent = abs ( amount . as_tuple ( ) . exponent ) #NEWLINE# if ( exponent != 2 ) : #NEWLINE# #INDENT# raise forms . ValidationError ( 'O amount deve conter duas casas decimais.' ) #NEWLINE# #UNINDENT# #UNINDENT# return amount