def complete_game_file_url(fileurl): assert fileurl abs_prefixes = ["http://", "https://", "/"] for pref in abs_prefixes: if fileurl.startswith(pref): return fileurl # URL SHALL NOT BE MODIFIED from pychronia_game.common import game_file_url return game_file_url(fileurl) # url starting with / and containing security token
def url(self, name): return game_file_url(name)