From 5876a8fd96efa01958904ca0796eb4018222bf25 Mon Sep 17 00:00:00 2001 From: cgrinds Date: Wed, 21 Apr 2010 02:33:32 +0800 Subject: [PATCH] Merge more upstream changes --- docs/installation.rst | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index f2f4905f..bb85b405 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -9,10 +9,10 @@ way and why there are multiple ways. Flask depends on two external libraries: `Werkzeug `_ and `Jinja2 `_. -The first one is responsible for interfacing WSGI the latter for rendering +The first on is responsible for interfacing WSGI the latter to render templates. Now you are maybe asking, what is WSGI? WSGI is a standard in Python that is basically responsible for ensuring that your application -is behaving in a specific way so that you can run it on different +is behaving in a specific way that you can run it on different environments (for example on a local development server, on an Apache2, on lighttpd, on Google's App Engine or whatever you have in mind). @@ -26,10 +26,10 @@ Virtualenv is what you want to use during development and in production if you have shell access. So first: what does virtualenv do? If you are like me and you like Python, chances are you want to use it for another project as well. Now the more projects you have, the more likely it is -that you will be working with different versions of Python itself or at -least an individual library. Because let's face it: quite often libraries -break backwards compatibility and it's unlikely that your application will -not have any dependencies, that just won't happen. So virtualenv to the +that you will be working with different versions of Python itself or a +library involved. Because let's face it: quite often libraries break +backwards compatibility and it's unlikely that your application will +not have any dependencies, that just won't happen. So virtualenv for the rescue! It basically makes it possible to have multiple side-by-side @@ -47,7 +47,7 @@ or even better:: $ sudo pip install virtualenv -Chances are you have virtualenv installed on your system then. Maybe it's +Changes are you have virtualenv installed on your system then. Maybe it's even in your package manager (on ubuntu try ``sudo apt-get install python-virtualenv``). @@ -69,11 +69,7 @@ within:: Now you only have to activate it, whenever you work with it. On OS X and Linux do the following:: - $ . env/bin/activate - -(Note the whitespace between the dot and the script name. This means -execute this file in context of the shell. If the dot does not work for -whatever reason in your shell, try substituting it with ``source``) + $ source env/bin/activate If you are a Windows user, the following command is for you:: @@ -101,8 +97,8 @@ This is possible as well, but I would not recommend it. Just run (Run it in an Admin shell on Windows systems and without the `sudo`). -Living on the Edge ------------------- +Leaving on the Edge +------------------- You want to work with the latest version of Flask, there are two ways: you can either let `easy_install` pull in the development version or tell it @@ -115,7 +111,7 @@ Get the git checkout in a new virtualenv and run in develop mode:: Initialized empty Git repository in ~/dev/flask/.git/ $ cd flask $ virtualenv env - $ . env/bin/activate + $ source env/bin/activate New python executable in env/bin/python Installing setuptools............done. $ python setup.py develop @@ -131,7 +127,7 @@ To just get the development version without git, do this instead:: $ mkdir flask $ cd flask $ virtualenv env - $ . env/bin/activate + $ source env/bin/activate New python executable in env/bin/python Installing setuptools............done. $ easy_install Flask==dev @@ -152,7 +148,7 @@ Once you have done that it's important to add the `easy_install` command and other Python scripts to the path. To do that you have to add the Python installation's Script folder to the `PATH` variable. -To do that, right-click on your "Computer" desktop icon and click +To do that, click right on your "Computer" desktop icon and click "Properties". On Windows Vista and Windows 7 then click on "Advanced System settings", on Windows XP click on the "Advanced" tab instead. Then click on the "Environment variables" button and double click on the "Path" @@ -165,7 +161,7 @@ the following value:: ;C:\Python26\Scripts -Then you are done. To check that it worked, open the cmd and execute +Then you are done. To check if it worked, open the cmd and execute "easy_install". If you have UAC enabled it should prompt you for admin privileges.