summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/_locale/zh_CN/async.po2
-rwxr-xr-xdocs/tutorial.rst4
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/_locale/zh_CN/async.po b/docs/_locale/zh_CN/async.po
index 464158a..ffa5a02 100644
--- a/docs/_locale/zh_CN/async.po
+++ b/docs/_locale/zh_CN/async.po
@@ -143,7 +143,7 @@ msgid ""
"functions (``gevent.sleep()`` in this case)."
msgstr ""
"第一行很重要。它让gevent monkey-patch了大部分Python的阻塞API,让它们不阻塞当"
-"前经常,将CPU让给下一个greenlet。它实际上用基于gevent的伪线程替换了Python的线"
+"前线程,将CPU让给下一个greenlet。它实际上用基于gevent的伪线程替换了Python的线"
"程。这就是你依然可以使用 ``time.sleep()`` 这个照常来说会阻塞线程的函数。如果"
"这种monkey-patch的方式感令你感到不舒服,你依然可以使用gevent中相应的函数 "
"``gevent.sleep()`` 。"
diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index c787a78..410882b 100755
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -335,7 +335,7 @@ You can directly return file objects, but :func:`static_file` is the recommended
::
from bottle import static_file
- @route('/images/<filename:re:.*\.png>#')
+ @route('/images/<filename:re:.*\.png>')
def send_image(filename):
return static_file(filename, root='/path/to/image/files', mimetype='image/png')
@@ -663,7 +663,7 @@ Bottle stores file uploads in :attr:`BaseRequest.files` as :class:`FileUpload` i
category = request.forms.get('category')
upload = request.files.get('upload')
name, ext = os.path.splitext(upload.filename)
- if ext not in ('png','jpg','jpeg'):
+ if ext not in ('.png','.jpg','.jpeg'):
return 'File extension not allowed.'
save_path = get_save_path_for_category(category)