Skip to content
Myr

Merge pull request #701 from bruston/quickstart-typod

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixed a few typos in the quickstart doc

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 84958e5, 1723990 · Browse files · 1 file+7 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−7 removed

  • other:+7 added−7 removed

1 file+7 added−7 removed

modified:docs/quickstart.rst+7 added-7 removed
52 unmodified lines
53 user's browser.545. Finally we use the :meth:`~flask.Flask.run` function to run the local server55 with our application. The ``if __name__ == '__main__':`` makes sure the56 server only runs if the script is executed directly from the Python57 interpreter and not used as imported module.57 interpreter and not used as an imported module.5859To stop the server, hit control-C.6061.. _public-server:
80 unmodified lines
142Variable Rules143``````````````144145To add variable parts to a URL you can mark these special sections as146``<variable_name>``. Such a part is then passed as keyword argument to your147function. Optionally a converter can be specified by specifying a rule with146``<variable_name>``. Such a part is then passed as a keyword argument to your147function. Optionally a converter can be used by specifying a rule with148``<converter:variable_name>``. Here are some nice examples::149150 @app.route('/user/<username>')151 def show_user_profile(username):
38 unmodified lines
190 In the second case, however, the URL is defined without a trailing slash,191 rather like the pathname of a file on UNIX-like systems. Accessing the URL192 with a trailing slash will produce a 404 "Not Found" error.193194 This behavior allows relative URLs to continue working if users access the195 page when they forget a trailing slash, consistent with how Apache196 and other servers work. Also, the URLs will stay unique, which helps search197 engines avoid indexing the same page twice.194 This behavior allows relative URLs to continue working even if the trailing195 slash is ommited, consistent with how Apache and other servers work. Also, 196 the URLs will stay unique, which helps search engines avoid indexing the 197 same page twice.198199200.. _url-building:201
651 unmodified lines