[Twisted-web] Override File's DirectoryLister?
richb.hanover at gmail.com
Sun Oct 28 13:02:26 EDT 2012
I'm new to Twisted and it looks like a good way to add a web server to my
existing project. I am successfully following the example at
display the directories with the default file listing code.
Now I want to modify that default behavior for directory listing to:
- filter out/exclude certain kinds of files (e.g., by the extension), and
- add a few elements to the HTML page displayed.
I've read the code of static.py, and see that the the DirectoryLister class
seems to govern this. I believe I need to make a subslass, but I'm not a
strong Python programmer, so the minor variations I tried kept running
amiss of the class hierarchy, etc.
Could someone give me an outline of the method declarations that are needed
to get the behavior above? Many thanks.
Hanover, NH USA
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web