*** util.py.orig Mon Jul 14 22:22:13 2003 --- util.py Thu Aug 28 23:06:32 2003 *************** *** 136,143 **** _q_exports = [] def __init__(self, path, use_cache=0, list_directory=0, follow_symlinks=0, ! cache_time=None): """StaticDirectory(path:string, use_cache:bool, list_directory:bool, follow_symlinks:bool) --- 136,145 ---- _q_exports = [] + FileClass = StaticFile + def __init__(self, path, use_cache=0, list_directory=0, follow_symlinks=0, ! cache_time=None, FileClass=None): """StaticDirectory(path:string, use_cache:bool, list_directory:bool, follow_symlinks:bool) *************** *** 160,165 **** --- 162,168 ---- self.list_directory = list_directory self.follow_symlinks = follow_symlinks self.cache_time = cache_time + if FileClass: self.FileClass = FileClass def _q_index(self, request): """ *************** *** 210,219 **** item_filepath = os.path.join(self.path, dest) if os.path.isdir(item_filepath): ! item = StaticDirectory(item_filepath, self.use_cache, ! self.list_directory, self.follow_symlinks, self.cache_time) elif os.path.isfile(item_filepath): ! item = StaticFile(item_filepath, self.follow_symlinks, cache_time=self.cache_time) else: raise errors.TraversalError --- 213,223 ---- item_filepath = os.path.join(self.path, dest) if os.path.isdir(item_filepath): ! item = self.__class__(item_filepath, self.use_cache, ! self.list_directory, self.follow_symlinks, self.cache_time, ! self.FileClass) elif os.path.isfile(item_filepath): ! item = self.FileClass(item_filepath, self.follow_symlinks, cache_time=self.cache_time) else: raise errors.TraversalError