tiefpunkt’s avatartiefpunkt’s Twitter Archive—№ 16,821

  1. #Python #Flask people: is it true that the static file serving stuff does not support subdirectories? So I cannot do stuff like "/static/js/main.js", but if it's "/static/main.js" it works fine?
    1. …in reply to @tiefpunkt
      Looking at the source, it seems to be a problem all the way down in "werkzeug.security.safe_join", where the filename part, which in this case would be "js/main.js" should not contain seperators such as "/"
      1. …in reply to @tiefpunkt
        Interestingly, if you were to host static files via nginx directly, that stuff would work. But with the Flask internal server, or Gunicorn etc, you're out of luck?