

def clean_username(self):
    "\n        Remove an '@<domain>' suffix if present and return only\n        the username.\n        "
    username = self.cleaned_data.get('username').split('@')[0]
    if (not username):
        raise forms.ValidationError(_('Invalid username provided'))
    return username

dataset/ETHPy150Open jbittel/django-mama-cas/mama_cas/forms.py LoginFormEmail.clean_username/original