Skip to content

Commit

Permalink
add requirements.txt at install django section
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayof committed Jul 11, 2018
1 parent bcb568a commit e7efa9a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion en/django_installation/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ Before we do that, we should make sure we have the latest version of `pip`, the
(myvenv) ~$ python3 -m pip install --upgrade pip
```
Then run `pip install django~=2.0.6` to install Django.
### Installing packages with requirements
A requirements file keep a list of dependencies to be installed using
`pip install`:
First, run `pip install django~=2.0.6` to install Django.
{% filename %}command-line{% endfilename %}
```
Expand Down Expand Up @@ -204,4 +209,15 @@ data-collapse=true ces-->
<!--endsec-->
Let's create a `requirements.txt`, run `pip freeze > requirements.txt` to save `django~=2.0.6` as a dependency of the project.
The `requirements.txt` should be inside of `blog/`:
```
blog
└───requirements.txt
```
That's it! You're now (finally) ready to create a Django application!
2 changes: 1 addition & 1 deletion en/extend_your_application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ urlpatterns = [
]
```

This part ``post/<int:pk>/`` specify a url pattern – we will explain it for you:
This part ``post/<int:pk>/`` specifies a URL pattern – we will explain it for you:
- `post/` just means that the URL should begin with the word __post__ followed by a __/__. So far so good.
- `<int:pk>` – this part is trickier. It means that Django expects an integer value and will transfer it to a view as a variable called `pk`.
- `/` – then we need a __/__ again before finishing the url.
Expand Down

0 comments on commit e7efa9a

Please sign in to comment.