code: def clean(self):
          '''Check to make sure password fields match.'''
          data = super(SignupForm, self).clean()
  
          # basic check for now
          if 'username' in data:
              if User.objects.filter(
                      username=data['username'],
                      email=data['email']).exists():
                  raise validators.ValidationError(
                      _('Username or email exists in database.'))
  
          if 'password' in data:
              if data['password'] != data.get('confirm_password', None):
                  raise validators.ValidationError(_('Passwords do not match.'))
              else:
                  data.pop('confirm_password')
          return datf clean(self):
          '''Check to make sure password fields match.'''
          data = super(SignupForm, self).clean()
  
          # basic check for now
          if 'username' in data:
              if User.objects.filter(
                      username=data['username'],
                      email=data['email']).exists():
                  raise validators.ValidationError(
                      _('Username or email exists in database.'))
  
          if 'password' in data:
              if data['password'] != data.get('confirm_password', None):
                  raise validators.ValidationError(_('Passwords do not match.'))
              else:
                  data.pop('confirm_password')
          return data
docs: Check to make sure password fields match.