parameters: (self)
return_statement: return self.cleaned_data['old_password']
docstring: Clean old password if needed
docstring_summary: Clean old password if needed
docstring_tokens: Clean old password if needed
function: def clean_old_password(self):
          '''
          Clean old password if needed
          '''
          if 'old_password' not in self.data:
              return None
  
          if self.instance.password == '!':
              return None
  
          if not self.instance.check_password(self.cleaned_data['old_password']):
              raise django_forms.ValidationError(_(u'Invalid password.'))
          return self.cleaned_data['old_password']
function_tokens: def clean_old_password ( self ) : if 'old_password' not in self . data : return None if self . instance . password == '!' : return None if not self . instance . check_password ( self . cleaned_data [ 'old_password' ] ) : raise django_forms . ValidationError ( _ ( u'Invalid password.' ) ) return self . cleaned_data [ 'old_password' ]