Back to Issue List

Directory Listing for Static Files

beginner-friendly enhancement

We should add a flag to enable directory listings within __STATIC__ directories (i.e., navigating to a directory should show a listing of the files contained therein if a particular flag is set).


adam j hartz <> commented at 21 Jun 2019; 11:26 AM:

I think the right entry point for this change is the main function in Right now, things short circuit in the case of requesting a static file. I think we want to keep that short-circuiting in place but only do that in the case where the URL actually represents a static file on disk.

Then, farther down the function (after we've run the files), if the resource being requested represents a static directory, we can check to see if some option (yet to be defined) has been set, and, if it has, generate a page to list the files in the directory.

We'll need to make sure this properly handles not only the base __STATIC__ directory, but also subdirectories.



Back to Issue List