def blueprint_name_to_url ( name ) : if name [ - 1 : ] == "." : name = name [ : - 1 ] name = str ( name ) . replace ( "." , "/" ) return name
strip fqdn from url python flask
remove the last . in the string it it ends with a . for the url structure must follow the flask routing format it should be / model / method instead of / model / method /
def blueprint_name_to_url(name):
        """ remove the last . in the string it it ends with a .
            for the url structure must follow the flask routing format
            it should be /model/method instead of /model/method/
        """
        if name[-1:] == ".":
            name = name[:-1]
        name = str(name).replace(".", "/")
        return name