summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2011-02-22 18:17:31 +0100
committerMarcel Hellkamp <marc@gsites.de>2011-02-22 18:17:31 +0100
commit362fd2d3ceecb95fd7da4e91fa892873c3cb6339 (patch)
treedd7e7ddbee9682900bd2e3d0f350674ae95a8b64
parent57de5eb5078534728e65bba7f9dc5d240d5e2390 (diff)
downloadbottle-362fd2d3ceecb95fd7da4e91fa892873c3cb6339.tar.gz
More typos (thanks david)
-rwxr-xr-xapidoc/plugins/devguide.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/apidoc/plugins/devguide.rst b/apidoc/plugins/devguide.rst
index 7fc6f87..a715b42 100755
--- a/apidoc/plugins/devguide.rst
+++ b/apidoc/plugins/devguide.rst
@@ -35,7 +35,7 @@ This plugin measures the execution time for each request and adds an appropriate
The last line tells Bottle to install the plugin to the default application. This causes the plugin to be automatically applied to all routes of that application. In other words, ``stopwatch()`` is called once for each route callback and the return value is used as a replacement for the original callback.
-Plugins are applied on demand, that is, as soon as a route is requested for the first time. For this to work properly in multi-threaded environments, the plugin needs to be thread-save. This is not a problem most of the time, but keep it in mind.
+Plugins are applied on demand, that is, as soon as a route is requested for the first time. For this to work properly in multi-threaded environments, the plugin needs to be thread-safe. This is not a problem most of the time, but keep it in mind.
Once all plugins are applied to a route, the prepared callback is cached and subsequent requests are handled by the cached version directly. This means that a plugin is usually applied only once to a specific route. That cache, however, is cleared every time the list of installed plugins changes. Your plugin should be able to decorate the same route more than once.
@@ -181,7 +181,7 @@ This plugin provides an sqlite3 database connection handle as an additional keyw
# Replace the route callback with the wrapped one.
return wrapper
-This plugin is actually useful and very similar to the version bundled with Bottle. Not bad for less than 60 lines of code, don't you think? Here is an usage example::
+This plugin is actually useful and very similar to the version bundled with Bottle. Not bad for less than 60 lines of code, don't you think? Here is a usage example::
sqlite = SQLitePlugin(dbfile='/tmp/test.db')
bottle.install(sqlite)
@@ -202,5 +202,5 @@ This plugin is actually useful and very similar to the version bundled with Bott
sqlite.dbfile = '/tmp/%s.db' % db
return "Switched DB to %s.db" % db
-The first route needs a database connection and tells the plugin to create a handle by requesting a ``db`` keyword argument. The second route does not need a database and is therefor ignored by the plugin. The third route does expect a 'db' keyword argument, but explicitly skips the sqlite plugin. This way the argument is not overruled by the plugin and still contains the value of the same-named url argument.
+The first route needs a database connection and tells the plugin to create a handle by requesting a ``db`` keyword argument. The second route does not need a database and is therefore ignored by the plugin. The third route does expect a 'db' keyword argument, but explicitly skips the sqlite plugin. This way the argument is not overruled by the plugin and still contains the value of the same-named url argument.