Merge branch 'master' of git://github.com/mitsuhiko/flask

This commit is contained in:
Dag Odenhall 2010-11-09 22:15:21 +01:00
commit 7596f83bc5
10 changed files with 17 additions and 15 deletions

View file

@ -187,12 +187,12 @@ To access the current session you can use the :class:`session` object:
# so mark it as modified yourself
session.modified = True
.. attribute:: permanent
.. attribute:: permanent
If set to `True` the session life for
:attr:`~flask.Flask.permanent_session_lifetime` seconds. The
default is 31 days. If set to `False` (which is the default) the
session will be deleted when the user closes the browser.
If set to `True` the session life for
:attr:`~flask.Flask.permanent_session_lifetime` seconds. The
default is 31 days. If set to `False` (which is the default) the
session will be deleted when the user closes the browser.
Application Globals

View file

@ -32,7 +32,7 @@ static files are in subdirectories within the Python source tree of the
application.
The main reason however why Flask is called a "microframework" is the idea
to keep the core simple but extensible. There is database abstraction
to keep the core simple but extensible. There is no database abstraction
layer, no form validation or anything else where different libraries
already exist that can handle that. However Flask knows the concept of
extensions that can add this functionality into your application as if it

View file

@ -147,7 +147,7 @@ To just get the development version without git, do this instead::
`easy_install` on Windows
-------------------------
On Windows, installation of `easy_install` is a little bit tricker because
On Windows, installation of `easy_install` is a little bit trickier because
slightly different rules apply on Windows than on Unix-like systems, but
it's not difficult. The easiest way to do it is to download the
`ez_setup.py`_ file and run it. The easiest way to run the file is to

View file

@ -11,7 +11,7 @@ Cross-Site Scripting (XSS)
--------------------------
Cross site scripting is the concept of injecting arbitrary HTML (and with
it JavaScript) into the context of a website. To rememdy this, developers
it JavaScript) into the context of a website. To remedy this, developers
have to properly escape text so that it cannot include arbitrary HTML
tags. For more information on that have a look at the Wikipedia article
on `Cross-Site Scripting

View file

@ -179,8 +179,8 @@ The following signals exist in Flask:
template.name or 'string template',
context)
from flask import request_started
request_started.connect(log_template_renders, app)
from flask import template_rendered
template_rendered.connect(log_template_renders, app)
.. data:: flask.request_started
:noindex:

View file

@ -173,7 +173,7 @@ like this::
text='<strong>HTML</strong> allowed here'
), follow_redirects=True)
assert 'No entries here so far' not in rv.data
assert '&lt;Hello&gt' in rv.data
assert '&lt;Hello&gt;' in rv.data
assert '<strong>HTML</strong> allowed here' in rv.data
Here we check that HTML is allowed in the text but not in the title,

View file

@ -14,7 +14,7 @@ less web-2.0-ish name ;) Basically we want it to do the following things:
3. the page shows all entries so far in reverse order (newest on top) and
the user can add new ones from there if logged in.
We will be using SQlite3 directly for that application because it's good
We will be using SQLite3 directly for that application because it's good
enough for an application of that size. For larger applications however
it makes a lot of sense to use `SQLAlchemy`_ that handles database
connections in a more intelligent way, allows you to target different

View file

@ -56,7 +56,7 @@ execute code on the server!
We also add a method to easily connect to the database specified. That
can be used to open a connection on request and also from the interactive
Python shell or a script. This will come in handy later
Python shell or a script. This will come in handy later.
::

View file

@ -66,7 +66,7 @@ class FlaskrTestCase(unittest.TestCase):
text='<strong>HTML</strong> allowed here'
), follow_redirects=True)
assert 'No entries here so far' not in rv.data
assert '&lt;Hello&gt' in rv.data
assert '&lt;Hello&gt;' in rv.data
assert '<strong>HTML</strong> allowed here' in rv.data

View file

@ -287,7 +287,9 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
relative path is specified.
Alternatively a file object might be provided
in which case `X-Sendfile` might not work and
fall back to the traditional method.
fall back to the traditional method. Make sure
that the file pointer is positioned at the start
of data to send before calling :func:`send_file`.
:param mimetype: the mimetype of the file if provided, otherwise
auto detection happens.
:param as_attachment: set to `True` if you want to send this file with