summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantiago Gala <sgala@apache.org>2010-03-16 15:45:45 +0100
committerMarcel Hellkamp <marc@gsites.de>2010-03-23 15:59:37 +0100
commitae068c53df4a1cf73b2b5574aa35fd1cd2a7e667 (patch)
tree967b4848def0af889189a253a44bdad43cf66040
parent176443db59f5c7631c4ee640ddff22e92cf40c7c (diff)
downloadbottle-ae068c53df4a1cf73b2b5574aa35fd1cd2a7e667.tar.gz
Don't use internal name in example
The example will fail as it turns the call to static_file into a recursive call. Likely a leftover, as it worked when send_file was used.
-rwxr-xr-xbottle.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bottle.py b/bottle.py
index 7dc69b2..dd759ab 100755
--- a/bottle.py
+++ b/bottle.py
@@ -53,8 +53,9 @@ This is an example::
return 'Hello %s!' % name
@route('/static/:filename#.*#')
- def static_file(filename):
- send_file(filename, root='/path/to/static/files/')
+
+ def static(filename):
+ return static_file(filename, root='/path/to/static/files/')
run(host='localhost', port=8080)
"""