(self, request)
return usernames
Get username list from Excel supplied in request.FILES.
            Adds any errors to request.messages.
Get username list from Excel supplied in request.FILES.
            Adds any errors to request.messages.
Get username list from Excel supplied in request . FILES . Adds any errors to request . messages .
def _get_usernames(self, request):
        """
            Get username list from Excel supplied in request.FILES.
            Adds any errors to request.messages.
        """
        sheet = self._get_sheet(request)
        if not sheet:
            return None

        try:
            usernames = [format_username(row['username'], request.domain) for row in sheet]
        except KeyError:
            messages.error(request, _("No users found. Please check your file contains a 'username' column."))
            return None

        if not len(usernames):
            messages.error(request, _("No users found. Please check file is not empty."))
            return None

        return usernames
def _get_usernames ( self , request ) : sheet = self . _get_sheet ( request ) if not sheet : return None try : usernames = [ format_username ( row [ 'username' ] , request . domain ) for row in sheet ] except KeyError : messages . error ( request , _ ( "No users found. Please check your file contains a 'username' column." ) ) return None if not len ( usernames ) : messages . error ( request , _ ( "No users found. Please check file is not empty." ) ) return None return usernames