From 6875a057ec97fb17927b951cd1e5baeef2cf81d8 Mon Sep 17 00:00:00 2001 From: Ron DuPlain Date: Wed, 6 Oct 2010 14:05:35 +0800 Subject: [PATCH] Fixed small typos in docs. Added a cross-ref. --- docs/becomingbig.rst | 2 +- docs/config.rst | 4 ++-- docs/deploying/cgi.rst | 2 +- docs/deploying/fastcgi.rst | 2 +- docs/deploying/mod_wsgi.rst | 4 ++-- docs/deploying/others.rst | 4 ++-- docs/extensiondev.rst | 2 +- docs/license.rst | 2 +- docs/patterns/errorpages.rst | 2 +- docs/patterns/fileuploads.rst | 6 +++--- docs/patterns/flashing.rst | 4 ++-- docs/patterns/lazyloading.rst | 2 +- docs/patterns/mongokit.rst | 2 +- docs/patterns/sqlite3.rst | 2 +- docs/patterns/viewdecorators.rst | 2 +- docs/styleguide.rst | 6 +++--- docs/templating.rst | 2 +- docs/tutorial/setup.rst | 2 +- docs/upgrading.rst | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/becomingbig.rst b/docs/becomingbig.rst index 6c95c6e258..20a0186e2e 100644 --- a/docs/becomingbig.rst +++ b/docs/becomingbig.rst @@ -10,7 +10,7 @@ application there are ways to deal with that. Flask is powered by Werkzeug and Jinja2, two libraries that are in use at a number of large websites out there and all Flask does is bring those two together. Being a microframework Flask does not do much more than -combinding existing libraries - there is not a lot of code involved. +combining existing libraries - there is not a lot of code involved. What that means for large applications is that it's very easy to take the code from Flask and put it into a new module within the applications and expand on that. diff --git a/docs/config.rst b/docs/config.rst index e782bc7f1e..1c2648a5ec 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -61,7 +61,7 @@ The following configuration values are used internally by Flask: ``USE_X_SENDFILE`` enable/disable x-sendfile ``LOGGER_NAME`` the name of the logger ``SERVER_NAME`` the name of the server. Required for - subdomain support (eg: ``'localhost'``) + subdomain support (e.g.: ``'localhost'``) ``MAX_CONTENT_LENGTH`` If set to a value in bytes, Flask will reject incoming requests with a content length greater than this by @@ -222,7 +222,7 @@ your configuration files. However here a list of good recommendations: even create your own script for sourcing that activates a virtualenv and exports the development configuration for you. - Use a tool like `fabric`_ in production to push code and - configurations sepearately to the production server(s). For some + configurations separately to the production server(s). For some details about how to do that, head over to the :ref:`deploy` pattern. .. _fabric: http://fabfile.org/ diff --git a/docs/deploying/cgi.rst b/docs/deploying/cgi.rst index c0b8c56030..5d5b085cd3 100644 --- a/docs/deploying/cgi.rst +++ b/docs/deploying/cgi.rst @@ -38,7 +38,7 @@ Server Setup ------------ Usually there are two ways to configure the server. Either just copy the -`.cgi` into a `cgi-bin` (and use `mod_rerwite` or something similar to +`.cgi` into a `cgi-bin` (and use `mod_rewrite` or something similar to rewrite the URL) or let the server point to the file directly. In Apache for example you can put a like like this into the config: diff --git a/docs/deploying/fastcgi.rst b/docs/deploying/fastcgi.rst index a29664e852..19bd42ec69 100644 --- a/docs/deploying/fastcgi.rst +++ b/docs/deploying/fastcgi.rst @@ -123,7 +123,7 @@ webserver user is `www-data`:: $ cd /var/www/yourapplication $ python application.fcgi Traceback (most recent call last): - File "yourapplication.fcg", line 4, in + File "yourapplication.fcgi", line 4, in ImportError: No module named yourapplication In this case the error seems to be "yourapplication" not being on the python diff --git a/docs/deploying/mod_wsgi.rst b/docs/deploying/mod_wsgi.rst index 5b19f1d52f..40df522dd1 100644 --- a/docs/deploying/mod_wsgi.rst +++ b/docs/deploying/mod_wsgi.rst @@ -93,8 +93,8 @@ For more information consult the `mod_wsgi wiki`_. .. _virtual python: http://pypi.python.org/pypi/virtualenv .. _mod_wsgi wiki: http://code.google.com/p/modwsgi/wiki/ -Toubleshooting --------------- +Troubleshooting +--------------- If your application does not run, follow this guide to troubleshoot: diff --git a/docs/deploying/others.rst b/docs/deploying/others.rst index 793a4bedbf..8f08ecd18d 100644 --- a/docs/deploying/others.rst +++ b/docs/deploying/others.rst @@ -69,10 +69,10 @@ If you deploy your application behind an HTTP proxy you will need to rewrite a few headers in order for the application to work. The two problematic values in the WSGI environment usually are `REMOTE_ADDR` and `HTTP_HOST`. Werkzeug ships a fixer that will solve some common setups, -but you might want to write your own WSGI middlware for specific setups. +but you might want to write your own WSGI middleware for specific setups. The most common setup invokes the host being set from `X-Forwarded-Host` -and the remote address from `X-Forwared-For`:: +and the remote address from `X-Forward-For`:: from werkzeug.contrib.fixers import ProxyFix app.wsgi_app = ProxyFix(app.wsgi_app) diff --git a/docs/extensiondev.rst b/docs/extensiondev.rst index cfad85f0d9..1848ca8f11 100644 --- a/docs/extensiondev.rst +++ b/docs/extensiondev.rst @@ -153,7 +153,7 @@ There are two recommended ways for an extension to initialize: initialization functions: If your extension is called `helloworld` you might have a function - called ``init_helloworld(app[, extra_args])`` that initalizes the + called ``init_helloworld(app[, extra_args])`` that initializes the extension for that application. It could attach before / after handlers etc. diff --git a/docs/license.rst b/docs/license.rst index 62e5c75ea8..38777e6662 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -4,7 +4,7 @@ License Flask is licensed under a three clause BSD License. It basically means: do whatever you want with it as long as the copyright in Flask sticks around, the conditions are not modified and the disclaimer is present. -Furthermore you must not use the names of the authors to promote derivates +Furthermore you must not use the names of the authors to promote derivatives of the software without written consent. The full license text can be found below (:ref:`flask-license`). For the diff --git a/docs/patterns/errorpages.rst b/docs/patterns/errorpages.rst index d78525494c..4041bd8a09 100644 --- a/docs/patterns/errorpages.rst +++ b/docs/patterns/errorpages.rst @@ -33,7 +33,7 @@ even if the application behaves correctly: instead of 404. If you are not deleting documents permanently from the database but just mark them as deleted, do the user a favour and use the 410 code instead and display a message that what he was - looking for was deleted for all ethernity. + looking for was deleted for all eternity. *500 Internal Server Error* Usually happens on programming errors or if the server is overloaded. diff --git a/docs/patterns/fileuploads.rst b/docs/patterns/fileuploads.rst index 99f009c72f..221ce327b5 100644 --- a/docs/patterns/fileuploads.rst +++ b/docs/patterns/fileuploads.rst @@ -41,9 +41,9 @@ the URL to these files. Why do we limit the extensions that are allowed? You probably don't want your users to be able to upload everything there if the server is directly sending out the data to the client. That way you can make sure that users -are not able to upload HTML files that would cause XSS problems. Also -make sure to disallow `.php` files if the server executes them, but who -has PHP installed on his server, right? :) +are not able to upload HTML files that would cause XSS problems (see +:ref:`xss`). Also make sure to disallow `.php` files if the server +executes them, but who has PHP installed on his server, right? :) Next the functions that check if an extension is valid and that uploads the file and redirects the user to the URL for the uploaded file:: diff --git a/docs/patterns/flashing.rst b/docs/patterns/flashing.rst index 4cea0206ad..3610944ec2 100644 --- a/docs/patterns/flashing.rst +++ b/docs/patterns/flashing.rst @@ -30,7 +30,7 @@ So here is a full example:: request.form['password'] != 'secret': error = 'Invalid credentials' else: - flash('You were sucessfully logged in') + flash('You were successfully logged in') return redirect(url_for('index')) return render_template('login.html', error=error) @@ -100,7 +100,7 @@ to the :func:`~flask.flash` function:: Inside the template you then have to tell the :func:`~flask.get_flashed_messages` function to also return the -categories. The loop looks slighty different in that situation then: +categories. The loop looks slightly different in that situation then: .. sourcecode:: html+jinja diff --git a/docs/patterns/lazyloading.rst b/docs/patterns/lazyloading.rst index 03b293d8e7..50ad6fa8d8 100644 --- a/docs/patterns/lazyloading.rst +++ b/docs/patterns/lazyloading.rst @@ -100,5 +100,5 @@ name and a dot, and by wrapping `view_func` in a `LazyView` as needed:: url('/user/', 'views.user') One thing to keep in mind is that before and after request handlers have -to be in a file that is imported upfront to work propery on the first +to be in a file that is imported upfront to work properly on the first request. The same goes for any kind of remaining decorator. diff --git a/docs/patterns/mongokit.rst b/docs/patterns/mongokit.rst index c1727c80f0..a9c4eef532 100644 --- a/docs/patterns/mongokit.rst +++ b/docs/patterns/mongokit.rst @@ -78,7 +78,7 @@ validator for the maximum character length and uses a special MongoKit feature called `use_dot_notation`. Per default MongoKit behaves like a python dictionary but with `use_dot_notation` set to `True` you can use your documents like you use models in nearly any other ORM by using dots to -seperate between attributes. +separate between attributes. You can insert entries into the database like this: diff --git a/docs/patterns/sqlite3.rst b/docs/patterns/sqlite3.rst index 1032097e50..6883323445 100644 --- a/docs/patterns/sqlite3.rst +++ b/docs/patterns/sqlite3.rst @@ -61,7 +61,7 @@ Or if you just want a single result:: To pass variable parts to the SQL statement, use a question mark in the statement and pass in the arguments as a list. Never directly add them to -the SQL statement with string formattings because this makes it possible +the SQL statement with string formatting because this makes it possible to attack the application using `SQL Injections `_. diff --git a/docs/patterns/viewdecorators.rst b/docs/patterns/viewdecorators.rst index 73d678529c..c61f1a4b67 100644 --- a/docs/patterns/viewdecorators.rst +++ b/docs/patterns/viewdecorators.rst @@ -89,7 +89,7 @@ Here the code:: return decorated_function return decorator -Notice that this assumes an instanciated `cache` object is available, see +Notice that this assumes an instantiated `cache` object is available, see :ref:`caching-pattern` for more information. diff --git a/docs/styleguide.rst b/docs/styleguide.rst index ec6990523d..0fdc88d847 100644 --- a/docs/styleguide.rst +++ b/docs/styleguide.rst @@ -72,7 +72,7 @@ Expressions and Statements General whitespace rules: - No whitespace for unary operators that are not words - (eg: ``-``, ``~`` etc.) as well on the inner side of parentheses. + (e.g.: ``-``, ``~`` etc.) as well on the inner side of parentheses. - Whitespace is placed between binary operators. Good:: @@ -151,7 +151,7 @@ Docstrings Docstring conventions: All docstrings are formatted with reStructuredText as understood by Sphinx. Depending on the number of lines in the docstring, they are - layed out differently. If it's just one line, the closing triple + laid out differently. If it's just one line, the closing triple quote is on the same line as the opening, otherwise the text is on the same line as the opening quote and the triple quote that closes the string on its own line:: @@ -162,7 +162,7 @@ Docstring conventions: def bar(): """This is a longer docstring with so much information in there - that it spans three lines. In this case the closing tripple quote + that it spans three lines. In this case the closing triple quote is on its own line. """ diff --git a/docs/templating.rst b/docs/templating.rst index 2583cc2c11..bd940b0e49 100644 --- a/docs/templating.rst +++ b/docs/templating.rst @@ -144,7 +144,7 @@ autoescape %}`` block:

{{ will_not_be_escaped }} {% endautoescape %} -Whenever you do this, please be very cautious about the varibles you are +Whenever you do this, please be very cautious about the variables you are using in this block. Registering Filters diff --git a/docs/tutorial/setup.rst b/docs/tutorial/setup.rst index b5ae2a0ed2..9f762c8498 100644 --- a/docs/tutorial/setup.rst +++ b/docs/tutorial/setup.rst @@ -76,7 +76,7 @@ focus on that a little later. First we should get the database working. .. admonition:: Externally Visible Server - Want your server to be publically available? Check out the + Want your server to be publicly available? Check out the :ref:`externally visible server ` section for more information. diff --git a/docs/upgrading.rst b/docs/upgrading.rst index 91da2b7834..17523290ef 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -52,7 +52,7 @@ order of after-request handlers. Previously they were called in the order of the registration, now they are called in reverse order. This change was made so that Flask behaves more like people expected it to work and how other systems handle request pre- and postprocessing. If you -dependend on the order of execution of post-request functions, be sure to +depend on the order of execution of post-request functions, be sure to change the order. Another change that breaks backwards compatibility is that context