Merge branch 'florentx-fork'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Armin Ronacher · committed by Armin Ronacher · parents 7e80195, b6e7330 · Browse files · 1 file·+18 added−14 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+18 added−14 removed
- other:+18 added−14 removed
Provenance
- Commit
d73be4b- Tree
b9694d3- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent 1
7e80195- Parent 2
b6e7330
1 file changed+18 added−14 removed
modified:docs/installation.rst+18 added-14 removed
7 unmodified lines8 way and why there are multiple ways.9 10 Flask depends on two external libraries: `Werkzeug11 <http://werkzeug.pocoo.org/>`_ and `Jinja2 <http://jinja.pocoo.org/2/>`_.12-The first on is responsible for interfacing WSGI the latter to render12+The first one is responsible for interfacing WSGI the latter for rendering13 templates. Now you are maybe asking, what is WSGI? WSGI is a standard14 in Python that is basically responsible for ensuring that your application15-is behaving in a specific way that you can run it on different15+is behaving in a specific way so that you can run it on different16 environments (for example on a local development server, on an Apache2, on17 lighttpd, on Google's App Engine or whatever you have in mind).18 19 So how do you get all that on your computer in no time? The most kick-ass5 unmodified lines25 Virtualenv is what you want to use during development and in production if26 you have shell access. So first: what does virtualenv do? If you are27 like me and you like Python, chances are you want to use it for another28 project as well. Now the more projects you have, the more likely it is29-that you will be working with different versions of Python itself or a30-library involved. Because let's face it: quite often libraries break31-backwards compatibility and it's unlikely that your application will32-not have any dependencies, that just won't happen. So virtualenv for the29+that you will be working with different versions of Python itself or at30+least an individual library. Because let's face it: quite often libraries 31+break backwards compatibility and it's unlikely that your application will32+not have any dependencies, that just won't happen. So virtualenv to the33 rescue!34 35 It basically makes it possible to have multiple side-by-side36 "installations" of Python, each for your own project. It's not actually9 unmodified lines46 or even better::47 48 $ sudo pip install virtualenv49 50-Changes are you have virtualenv installed on your system then. Maybe it's50+Chances are you have virtualenv installed on your system then. Maybe it's51 even in your package manager (on ubuntu try ``sudo apt-get install52 python-virtualenv``).53 54 If you are on Windows and missing the `easy_install` command you have to13 unmodified lines68 69 Now you only have to activate it, whenever you work with it. On OS X and70 Linux do the following::71 72- $ source env/bin/activate72+ $ . env/bin/activate73 74+(Note the whitespace between the dot and the script name. This means75+execute this file in context of the shell. If the dot does not work for76+whatever reason in your shell, try substituting it with ``source``)77+78 If you are a Windows user, the following command is for you::79 80 $ env\scripts\activate81 18 unmodified lines100 101 (Run it in an Admin shell on Windows systems and without the `sudo`).102 103 100-Leaving on the Edge101--------------------104+Living on the Edge105+------------------106 107 You want to work with the latest version of Flask, there are two ways: you108 can either let `easy_install` pull in the development version or tell it109 to operate on a git checkout. Either way it's recommended to do that in a4 unmodified lines114 $ git clone http://github.com/mitsuhiko/flask.git115 Initialized empty Git repository in ~/dev/flask/.git/116 $ cd flask117 $ virtualenv env114- $ source env/bin/activate118+ $ . env/bin/activate119 New python executable in env/bin/python120 Installing setuptools............done.121 $ python setup.py develop122 ...7 unmodified lines130 131 $ mkdir flask132 $ cd flask133 $ virtualenv env130- $ source env/bin/activate134+ $ . env/bin/activate135 New python executable in env/bin/python136 Installing setuptools............done.137 $ easy_install Flask==dev138 ...12 unmodified lines151 Once you have done that it's important to add the `easy_install` command152 and other Python scripts to the path. To do that you have to add the153 Python installation's Script folder to the `PATH` variable.154 151-To do that, click right on your "Computer" desktop icon and click155+To do that, right-click on your "Computer" desktop icon and click156 "Properties". On Windows Vista and Windows 7 then click on "Advanced System157 settings", on Windows XP click on the "Advanced" tab instead. Then click158 on the "Environment variables" button and double click on the "Path"159 variable in the "System variables" section.4 unmodified lines164 the following value::165 166 ;C:\Python26\Scripts167 164-Then you are done. To check if it worked, open the cmd and execute168+Then you are done. To check that it worked, open the cmd and execute169 "easy_install". If you have UAC enabled it should prompt you for admin170 privileges.171 172 1 unmodified line