'Deletes a user from django auth'

def delete_user(self, uname):

    if (not uname):
        return _('Must    provide    username')
    if ('@' in uname):
        try:
            user = User.objects.get(email=uname)
        except User.DoesNotExist as err:
            msg = _('Cannot    find    user    with    email    address    {email_addr}').format(email_addr=uname)
            return msg
    else:
        try:
            user = User.objects.get(username=uname)
        except User.DoesNotExist as err:
            msg = _('Cannot    find    user    with    username    {username}    -    {error}').format(username=uname, error=str(err))
            return msg
    user.delete()
    return _('Deleted    user    {username}').format(username=uname)
