diff options
author | Marcel Hellkamp <marc@gsites.de> | 2013-07-26 10:04:28 -0700 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2013-07-26 10:04:28 -0700 |
commit | 22303b6b15109d6f4cde10677a572353e8ad77eb (patch) | |
tree | 91d64025c21bbd4b868e28999b60d10b6fc3da1f | |
parent | e1b781ee881a97225b22af0eb0dff0ee175814b7 (diff) | |
parent | b7ef72b9ca945e51ee2835e4043c8a367398e2c9 (diff) | |
download | bottle-22303b6b15109d6f4cde10677a572353e8ad77eb.tar.gz |
Merge pull request #532 from michael-k/small-fixes
Small fixes
-rwxr-xr-x | docs/tutorial.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorial.rst b/docs/tutorial.rst index c5930a6..5e4bb0e 100755 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -93,7 +93,7 @@ The Default Application For the sake of simplicity, most examples in this tutorial use a module-level :func:`route` decorator to define routes. This adds routes to a global "default application", an instance of :class:`Bottle` that is automatically created the first time you call :func:`route`. Several other module-level decorators and functions relate to this default application, but if you prefer a more object oriented approach and don't mind the extra typing, you can create a separate application object and use that instead of the global one:: - from bottle import Bottle, run, template + from bottle import Bottle, run app = Bottle() @@ -597,9 +597,9 @@ Let us start from the beginning. In HTML, a typical ``<form>`` looks something l .. code-block:: html <form action="/login" method="post"> - <input type="text" name="login" /> - <input type="password" name="password" /> - <input type="submit" value="Login" /> + Login: <input type="text" name="login" /> + Password: <input type="password" name="password" /> + <input type="submit" value="Login" /> </form> The ``action`` attribute specifies the URL that will receive the form data. ``method`` defines the HTTP method to use (``GET`` or ``POST``). With ``method="get"`` the form values are appended to the URL and available through :attr:`BaseRequest.query` as described above. This is considered insecure and has other limitations, so we use ``method="post"`` here. If in doubt, use ``POST`` forms. |