mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Updated the docs to make the setup in the quickstart and standard tutorial simpler.
This commit is contained in:
parent
76cfc5eb8a
commit
a7ff1a210c
|
@ -16,14 +16,14 @@ The tutorial is fairly in-depth, so you should probably get a cookie and a cup o
|
|||
|
||||
Before we do anything else we'll create a new virtual environment, using [virtualenv]. This will make sure our package configuration is kept nicely isolated from any other projects we're working on.
|
||||
|
||||
cd ~
|
||||
mkdir tutorial && cd tutorial
|
||||
virtualenv env
|
||||
source env/bin/activate
|
||||
|
||||
Now that we're inside a virtualenv environment, we can install our package requirements.
|
||||
Now that we're inside a virtualenv environment, we can install our package requirements. Pygments will be used for code highlighting.
|
||||
|
||||
pip install django
|
||||
pip install djangorestframework
|
||||
pip install pygments # We'll be using this for the code highlighting
|
||||
pip install django djangorestframework pygments
|
||||
|
||||
**Note:** To exit the virtualenv environment at any time, just type `deactivate`. For more information see the [virtualenv documentation][virtualenv].
|
||||
|
||||
|
@ -32,9 +32,7 @@ Now that we're inside a virtualenv environment, we can install our package requi
|
|||
Okay, we're ready to get coding.
|
||||
To get started, let's create a new project to work with.
|
||||
|
||||
cd ~
|
||||
django-admin.py startproject tutorial
|
||||
cd tutorial
|
||||
django-admin.py startproject tutorial .
|
||||
|
||||
Once that's done we can create an app that we'll use to create a simple Web API.
|
||||
|
||||
|
|
|
@ -7,16 +7,15 @@ We're going to create a simple API to allow admin users to view and edit the use
|
|||
Create a new Django project named `tutorial`, then start a new app called `quickstart`.
|
||||
|
||||
# Create the project directory
|
||||
mkdir tutorial
|
||||
cd tutorial
|
||||
cd ~
|
||||
mkdir tutorial && cd tutorial
|
||||
|
||||
# Create a virtualenv to isolate our package dependencies locally
|
||||
virtualenv env
|
||||
source env/bin/activate # On Windows use `env\Scripts\activate`
|
||||
|
||||
# Install Django and Django REST framework into the virtualenv
|
||||
pip install django
|
||||
pip install djangorestframework
|
||||
pip install django djangorestframework
|
||||
|
||||
# Set up a new project with a single application
|
||||
django-admin.py startproject tutorial .
|
||||
|
|
Loading…
Reference in New Issue
Block a user