Replace string format by os.path.join
wherever we want to create file paths
#952
Labels
os.path.join
wherever we want to create file paths
#952
This surfaced in #950: the
RELOAD_PARTICIPANT_URL
had a leading slash in the production settings, leading to problems with social media sharing. We should go over all the places where format strings are used to create file paths or urls. For file paths, we can useos.path.join
instead, which would avoid duplicating slashes, and make sure this also works on non-unix systems. For urls, there doesn't seem to be a standard library solution (urllib.parse
provides some functionality but only works with full urls as far as I can tell).The text was updated successfully, but these errors were encountered: