I'm building a basic file serving and managing system and want to have an error check to make sure a file exists on disk before serving. In my view, I'm able to build out urls using /static pretty easily, which refers back to one of several paths in a hierarchy of searches. Ideally, I would know pretty predictably where my managed files live because I'm putting them there.
Is there a way to de-render a static url /static/somefilename into a local POSIX-ish path /local/path/to/somefilename so I can do an os.path.exists() or other file operations on it?