Update virtualenv notes

This commit is contained in:
Tom Christie 2012-09-03 13:10:39 +01:00
parent 247a422a64
commit ebbaff0853

View File

@ -4,20 +4,24 @@
This tutorial will walk you through the building blocks that make up REST framework. It'll take a little while to get through, but it'll give you a comprehensive understanding of how everything fits together. This tutorial will walk you through the building blocks that make up REST framework. It'll take a little while to get through, but it'll give you a comprehensive understanding of how everything fits together.
## Getting started ## Setting up a new environment
Before we do anything else we'll create a new virtual environment, using [virtualenv]. This will make sure our package configuration is keep nicely isolated from any other projects we're working on. Before we do anything else we'll create a new virtual environment, using [virtualenv]. This will make sure our package configuration is keep nicely isolated from any other projects we're working on.
mkdir -p ~/.env mkdir ~/env
virtualenv --no-site-packages ~/.env/djangorestframework virtualenv --no-site-packages ~/env/djangorestframework
source ~/.env/djangorestframework/env/bin/activate source ~/env/djangorestframework/bin/activate
Now that we're inside a virtualenv environment, we can install our packages requirements. Now that we're inside a virtualenv environment, we can install our package requirements.
pip install django pip install django
pip install djangorestframework pip install djangorestframework
Now we're ready to get coding. ***Note:** To exit the virtualenv environment at any time, just type `deactivate`. For more information see the [virtualenv documentation][virtualenv].*
## Getting started
Okay, we're ready to get coding.
To get started, let's create a new project to work with. To get started, let's create a new project to work with.
django-admin.py startproject tutorial django-admin.py startproject tutorial