diff options
author | blackbird <blackbird@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-05-22 21:36:30 +0000 |
---|---|---|
committer | blackbird <blackbird@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-05-22 21:36:30 +0000 |
commit | a060a58b2f36f7813c29d250dddaa2b9f606c4cc (patch) | |
tree | 39412c4fe3e0d9e239c905e65d1deee3f442d330 /sandbox/py-rest-doc/sphinx/web/application.py | |
parent | 9962f8b9519f181f0ee823884d86c81c3afaa16d (diff) | |
download | docutils-a060a58b2f36f7813c29d250dddaa2b9f606c4cc.tar.gz |
new goto workflow :D /?q=blub goes to /q/blub/ which is basically /blub/ just that it does enforce a search. (/q/index/ vs /index/)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5096 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/py-rest-doc/sphinx/web/application.py')
-rw-r--r-- | sandbox/py-rest-doc/sphinx/web/application.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sandbox/py-rest-doc/sphinx/web/application.py b/sandbox/py-rest-doc/sphinx/web/application.py index 3bc2d1e55..d4242d507 100644 --- a/sandbox/py-rest-doc/sphinx/web/application.py +++ b/sandbox/py-rest-doc/sphinx/web/application.py @@ -204,6 +204,10 @@ class DocumentationApplication(object): url = req.path.strip('/') or 'index' if url == 'search': resp = self.search(req) + elif url == 'index' and 'q' in req.args: + resp = RedirectResponse('q/%s/' % req.args['q']) + elif url.startswith('q/'): + resp = self.get_keyword_matches(req, url[2:]) else: try: resp = self.get_page(req, url) |