forked from orbit-oss/flask
document python 2.6 minimum requirement, remove all stuff that refers to 2.5
This commit is contained in:
parent
521398d5e7
commit
40fad2ece8
10 changed files with 8 additions and 20 deletions
|
|
@ -390,7 +390,7 @@ extension to be approved you have to follow these guidelines:
|
|||
(``PackageName==dev``).
|
||||
9. The ``zip_safe`` flag in the setup script must be set to ``False``,
|
||||
even if the extension would be safe for zipping.
|
||||
10. An extension currently has to support Python 2.5, 2.6 as well as
|
||||
10. An extension currently has to support Python 2.6 as well as
|
||||
Python 2.7
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ So how do you get all that on your computer quickly? There are many ways you
|
|||
could do that, but the most kick-ass method is virtualenv, so let's have a look
|
||||
at that first.
|
||||
|
||||
You will need Python 2.5 or higher to get started, so be sure to have an
|
||||
You will need Python 2.6 or higher to get started, so be sure to have an
|
||||
up-to-date Python 2.x installation. Python 3.x is not supported.
|
||||
|
||||
.. _virtualenv:
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@ Python primitives (numbers, strings, dicts and lists) look like which is
|
|||
widely supported and very easy to parse. It became popular a few years
|
||||
ago and quickly replaced XML as transport format in web applications.
|
||||
|
||||
If you have Python 2.6 JSON will work out of the box, in Python 2.5 you
|
||||
will have to install the `simplejson`_ library from PyPI.
|
||||
|
||||
.. _jQuery: http://jquery.com/
|
||||
.. _simplejson: http://pypi.python.org/pypi/simplejson
|
||||
|
||||
Loading jQuery
|
||||
--------------
|
||||
|
|
|
|||
|
|
@ -21,12 +21,9 @@ errors. It's a good idea to add a function that initializes the database
|
|||
for you to the application.
|
||||
|
||||
If you want to do that, you first have to import the
|
||||
:func:`contextlib.closing` function from the contextlib package. If you
|
||||
want to use Python 2.5 it's also necessary to enable the `with` statement
|
||||
first (`__future__` imports must be the very first import). Accordingly,
|
||||
add the following lines to your existing imports in `flaskr.py`::
|
||||
:func:`contextlib.closing` function from the contextlib package.
|
||||
Accordingly, add the following lines to your existing imports in `flaskr.py`::
|
||||
|
||||
from __future__ import with_statement
|
||||
from contextlib import closing
|
||||
|
||||
Next we can create a function called `init_db` that initializes the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue