Skip to content

Commit db9f78c

Browse files
committed
Standardize on .venv for virtualenv name in docs
1 parent 97b3a02 commit db9f78c

File tree

2 files changed

+46
-23
lines changed

2 files changed

+46
-23
lines changed

docs/tutorial/1-serialization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ The tutorial is fairly in-depth, so you should probably get a cookie and a cup o
1111

1212
## Setting up a new environment
1313

14-
Before we do anything else we'll create a new virtual environment, using [venv]. This will make sure our package configuration is kept nicely isolated from any other projects we're working on.
14+
Before we do anything else we'll create a new virtual environment called `.venv`, using [venv]. This will make sure our package configuration is kept nicely isolated from any other projects we're working on.
1515

1616
=== ":fontawesome-brands-linux: Linux, :fontawesome-brands-apple: macOS"
1717

1818
```bash
19-
python3 -m venv env
20-
source env/bin/activate
19+
python3 -m venv .venv
20+
source .venv/bin/activate
2121
```
2222

2323
=== ":fontawesome-brands-windows: Windows"
2424

2525
```bash
26-
python3 -m venv env
27-
source env\Scripts\activate
26+
python3 -m venv .venv
27+
source .venv\Scripts\activate
2828
```
2929

3030
Now that we're inside a virtual environment, we can install our package requirements.

docs/tutorial/quickstart.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,47 @@ We're going to create a simple API to allow admin users to view and edit the use
66

77
Create a new Django project named `tutorial`, then start a new app called `quickstart`.
88

9-
```bash
10-
# Create the project directory
11-
mkdir tutorial
12-
cd tutorial
13-
14-
# Create a virtual environment to isolate our package dependencies locally
15-
python3 -m venv env
16-
source env/bin/activate # On Windows use `env\Scripts\activate`
17-
18-
# Install Django and Django REST framework into the virtual environment
19-
pip install djangorestframework
20-
21-
# Set up a new project with a single application
22-
django-admin startproject tutorial . # Note the trailing '.' character
23-
cd tutorial
24-
django-admin startapp quickstart
25-
cd ..
26-
```
9+
=== ":fontawesome-brands-linux: Linux, :fontawesome-brands-apple: macOS"
10+
11+
```bash
12+
# Create the project directory
13+
mkdir tutorial
14+
cd tutorial
15+
16+
# Create a virtual environment to isolate our package dependencies locally
17+
python3 -m venv .venv
18+
source .venv/bin/activate
19+
20+
# Install Django and Django REST framework into the virtual environment
21+
pip install djangorestframework
22+
23+
# Set up a new project with a single application
24+
django-admin startproject tutorial . # Note the trailing '.' character
25+
cd tutorial
26+
django-admin startapp quickstart
27+
cd ..
28+
```
29+
30+
=== ":fontawesome-brands-windows: Windows"
31+
32+
```bash
33+
# Create the project directory
34+
mkdir tutorial
35+
cd tutorial
36+
37+
# Create a virtual environment to isolate our package dependencies locally
38+
python3 -m venv .venv
39+
source .venv\Scripts\activate
40+
41+
# Install Django and Django REST framework into the virtual environment
42+
pip install djangorestframework
43+
44+
# Set up a new project with a single application
45+
django-admin startproject tutorial . # Note the trailing '.' character
46+
cd tutorial
47+
django-admin startapp quickstart
48+
cd ..
49+
```
2750

2851
The project layout should look like:
2952

0 commit comments

Comments
 (0)