[Twisted-web] Override File's DirectoryLister?
Rich Brown
richb.hanover at gmail.com
Sun Oct 28 13:02:26 EDT 2012
Folks,
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
http://twistedmatrix.com/documents/current/web/howto/web-in-60/static-dispatch.htmlto
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.
Rich Brown
Hanover, NH USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20121028/dce378d3/attachment.htm
More information about the Twisted-web
mailing list