<s> from django import forms <EOL> from django . conf import settings <EOL> class NSAForm ( forms . Form ) : <EOL> user = forms . CharField ( required = True ) <EOL> passwd = forms . CharField ( required = True , <EOL> widget = forms . fields . PasswordInput ) <EOL> def clean ( self ) : <EOL> cleaned_data = super ( NSAForm , self ) . clean ( ) <EOL> user = cleaned_data . get ( '<STR_LIT:user>' , None ) <EOL> passwd = cleaned_data . get ( '<STR_LIT>' , None ) <EOL> if user != "<STR_LIT>" : <EOL> self . _errors [ "<STR_LIT:user>" ] = self . error_class ( [ "<STR_LIT>" ] ) <EOL> if passwd != "<STR_LIT>" : <EOL> self . _errors [ "<STR_LIT>" ] = self . error_class ( [ "<STR_LIT>" ] ) <EOL> return cleaned_data </s>
