The issue is that you are using both static_files
and static_dir
to your /
url.
You need to either use static_files
or static_dir
.
From the description of your question it looks like you want to use static_dir
to match everything that is inside the directory after the url: /
.
As stated in the documentation:
- static_dir: The path to the directory containing the static files, from the application root directory. Everything after the end of the matched url pattern is appended to static_dir to form the full path to the requested file.
- static_files: A static file pattern handler associates a URL pattern with paths to static files uploaded with the application. The URL pattern regular expression can define regular expression groupings to be used in the construction of the file path. You can use this instead of static_dir to map to specific files in a directory structure without mapping the entire directory.