From aecda144476e28b9688941cbef7d95415821be9f Mon Sep 17 00:00:00 2001 From: Grygoriy Fuchedzhy Date: Mon, 10 Oct 2011 01:07:10 +0300 Subject: [PATCH] added ability to serve files which have no corresponding resources, such as thumbnails and tagger pages --- hyde/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hyde/server.py b/hyde/server.py index ffa56b2..4b7d8f7 100644 --- a/hyde/server.py +++ b/hyde/server.py @@ -70,6 +70,10 @@ class HydeRequestHandler(SimpleHTTPRequestHandler): res = site.content.resource_from_relative_deploy_path(path + '.' + ext) if res: break + for ext in site.config.urlcleaner.strip_extensions: + new_path = site.config.deploy_root_path.child(path + '.' + ext) + if File(new_path).exists: + return new_path else: res = site.content.resource_from_relative_deploy_path(path)