def upload_as_text(name, filename):
    """ 
    Upload the IPList as text from a file.

    :param str name: name of IPList
    :param str filename: name of text file to upload
    :return: None
    """
    location = list(IPList.objects.filter(name))
    if location:
        iplist = location[0]
        return iplist.upload(filename=filename, as_type='txt')
def upload_as_text ( name , filename ) : location = list ( IPList . objects . filter ( name ) ) if location : iplist = location [ 0 ] return iplist . upload ( filename = filename , as_type = 'txt' )
Upload the IPList as text from a file.

    :param str name: name of IPList
    :param str filename: name of text file to upload
    :return: None