def base_url(self, url):
        """Return url without querystring or fragment"""
        parts = list(self.parse_url(url))
        parts[4:] = ['' for i in parts[4:]]
        return urlunparse(parts)
def base_url ( self , url ) : parts = list ( self . parse_url ( url ) ) parts [ 4 : ] = [ '' for i in parts [ 4 : ] ] return urlunparse ( parts )
Return url without querystring or fragment