summaryrefslogtreecommitdiff
path: root/homepage
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2010-02-19 11:36:24 +0100
committerMarcel Hellkamp <marc@gsites.de>2010-02-19 11:36:24 +0100
commit24bc7832fd758c1e57ff5c41d197219aa5639ee4 (patch)
tree4a9350543d47abd14ab721ac2a5fb36287943c04 /homepage
parentd1b123265a54aa1d08d78f043cbadfcdc1a40620 (diff)
downloadbottle-24bc7832fd758c1e57ff5c41d197219aa5639ee4.tar.gz
Added apidocs to default bottle homepage
Diffstat (limited to 'homepage')
-rwxr-xr-xhomepage/app.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/homepage/app.py b/homepage/app.py
index 2cb115e..434b303 100755
--- a/homepage/app.py
+++ b/homepage/app.py
@@ -88,7 +88,13 @@ def iter_blogposts():
+# API docs
+@route('/api/:filename#.*#')
+def static(filename):
+ if not filename:
+ filename = 'index.html'
+ return bottle.static_file(filename, root='../apidoc/html/')
# Static files
@@ -96,7 +102,6 @@ def iter_blogposts():
def static(filename):
return bottle.static_file(filename, root='./static/')
-
# Bottle Pages
@route('/')