def browse_dir(path, db): if not request.url.endswith('/'): redirect('%s/' % request.url) controller = Browse(cfg, db) return controller.browse(path)