Skip to content
Myr

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

1 file+18 added−14 removed

modified:docs/installation.rst+18 added-14 removed
7 unmodified lines
8way and why there are multiple ways.910Flask depends on two external libraries: `Werkzeug11<http://werkzeug.pocoo.org/>`_ and `Jinja2 <http://jinja.pocoo.org/2/>`_.12The first on is responsible for interfacing WSGI the latter to render12The first one is responsible for interfacing WSGI the latter for rendering13templates. Now you are maybe asking, what is WSGI? WSGI is a standard14in Python that is basically responsible for ensuring that your application15is behaving in a specific way that you can run it on different15is behaving in a specific way so that you can run it on different16environments (for example on a local development server, on an Apache2, on17lighttpd, on Google's App Engine or whatever you have in mind).1819So how do you get all that on your computer in no time? The most kick-ass
5 unmodified lines
25Virtualenv is what you want to use during development and in production if26you have shell access. So first: what does virtualenv do? If you are27like me and you like Python, chances are you want to use it for another28project as well. Now the more projects you have, the more likely it is29that you will be working with different versions of Python itself or a30library involved. Because let's face it: quite often libraries break31backwards compatibility and it's unlikely that your application will32not have any dependencies, that just won't happen. So virtualenv for the29that you will be working with different versions of Python itself or at30least an individual library. Because let's face it: quite often libraries 31break backwards compatibility and it's unlikely that your application will32not have any dependencies, that just won't happen. So virtualenv to the33rescue!3435It basically makes it possible to have multiple side-by-side36"installations" of Python, each for your own project. It's not actually
9 unmodified lines
46or even better::4748 $ sudo pip install virtualenv4950Changes are you have virtualenv installed on your system then. Maybe it's50Chances are you have virtualenv installed on your system then. Maybe it's51even in your package manager (on ubuntu try ``sudo apt-get install52python-virtualenv``).5354If you are on Windows and missing the `easy_install` command you have to
13 unmodified lines
6869Now you only have to activate it, whenever you work with it. On OS X and70Linux do the following::7172 $ source env/bin/activate72 $ . env/bin/activate7374(Note the whitespace between the dot and the script name. This means75execute this file in context of the shell. If the dot does not work for76whatever reason in your shell, try substituting it with ``source``)7778If you are a Windows user, the following command is for you::7980 $ env\scripts\activate81
18 unmodified lines
100101(Run it in an Admin shell on Windows systems and without the `sudo`).102103100Leaving on the Edge101-------------------104Living on the Edge105------------------106107You want to work with the latest version of Flask, there are two ways: you108can either let `easy_install` pull in the development version or tell it109to operate on a git checkout. Either way it's recommended to do that in a
4 unmodified lines
114 $ 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 lines
130131 $ 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 lines
151Once you have done that it's important to add the `easy_install` command152and other Python scripts to the path. To do that you have to add the153Python installation's Script folder to the `PATH` variable.154151To do that, click right on your "Computer" desktop icon and click155To do that, right-click on your "Computer" desktop icon and click156"Properties". On Windows Vista and Windows 7 then click on "Advanced System157settings", on Windows XP click on the "Advanced" tab instead. Then click158on the "Environment variables" button and double click on the "Path"159variable in the "System variables" section.
4 unmodified lines
164the following value::165166 ;C:\Python26\Scripts167164Then you are done. To check if it worked, open the cmd and execute168Then 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 admin170privileges.171172
1 unmodified line