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

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