Skip to content

Commit f72dfe3

Browse files
authored
Merge pull request #1854 from mcagl/feature/check-tutorial-update-status
Update and cleanup of the tutorial after the update to newer python/django versions
2 parents fba1420 + 508cef2 commit f72dfe3

File tree

18 files changed

+37
-37
lines changed

18 files changed

+37
-37
lines changed

en/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This tutorial is maintained by [DjangoGirls](https://djangogirls.org/). If you f
4646

4747
## Would you like to help us translate the tutorial into other languages?
4848

49-
Currently, translations are being kept on crowdin.com platform at:
49+
Currently, translations are being kept on the crowdin.com platform at:
5050

5151
https://crowdin.com/project/django-girls-tutorial
5252

Loading

en/css/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ Time to write some CSS! Open up the `blog/static/css/blog.css` file in your code
7070
We won't be going too deep into customizing and learning about CSS here. There is a recommendation for a free CSS course at the end of this page if you would like to learn more.
7171

7272
But let's do at least a little. Maybe we could change the color of our headers?
73-
To understand colors, computers use special codes. These codes start with `#` followed by 6 letters (A–F) and numbers (0–9). For example, the code for blue is `#0000FF`. You can find the color codes for many colors here: http://www.colorpicker.com/. You may also use [predefined colors](http://www.w3schools.com/colors/colors_names.asp), such as `red` and `green`.
73+
To understand colors, computers use special codes. These codes start with `#` followed by 6 letters (A–F) and numbers (0–9). For example, the code for blue is `#0000FF`. You can find the color codes for many colors here: https://www.colorpicker.com/. You may also use predefined [named colors](https://developer.mozilla.org/en-US/docs/Web/CSS/named-color), such as `red` and `green`.
74+
7475

7576
In your `blog/static/css/blog.css` file you should add the following code:
7677

@@ -91,8 +92,7 @@ We also identify elements by the attribute `class` or the attribute `id`. Class
9192
<a href="https://en.wikipedia.org/wiki/Django" class="external_link" id="link_to_wiki_page">
9293
```
9394

94-
You can read more about [CSS Selectors at w3schools](http://www.w3schools.com/cssref/css_selectors.asp).
95-
95+
You can read more about [CSS Selectors at MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors).
9696
We also need to tell our HTML template that we added some CSS. Open the `blog/templates/blog/post_list.html` file in the code editor and add this line at the very beginning of it:
9797

9898
{% filename %}blog/templates/blog/post_list.html{% endfilename %}
@@ -162,7 +162,7 @@ Maybe we can customize the font in our header? Paste this into your `<head>` in
162162
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext">
163163
```
164164

165-
As before, check the order and place before the link to `blog/static/css/blog.css`. This line will import a font called *Lobster* from Google Fonts (https://www.google.com/fonts).
165+
Again, check the order and place it before the link to `blog/static/css/blog.css`. This line will import a font called *Lobster* from Google Fonts (https://www.google.com/fonts).
166166

167167
Find the `h1 a` declaration block (the code between braces `{` and `}`) in the CSS file `blog/static/css/blog.css`. Now add the line `font-family: 'Lobster';` between the braces, and refresh the page:
168168

en/deploy/images/deployment_cloud.png

-71 KB
Loading

en/deploy/images/deployment_local.png

-53.5 KB
Loading

en/deploy/pythonanywhere.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ If you see an error while running the `pa_autoconfigure_django.py` script, here
8383

8484
If you see an error when you try to visit your site, the first place to look for some debugging info is in your **error log**. You'll find a link to this on the PythonAnywhere ["Web" page](https://www.pythonanywhere.com/web_app_setup/). See if there are any error messages in there; the most recent ones are at the bottom.
8585

86-
There are also some [general debugging tips on the PythonAnywhere help site](http://help.pythonanywhere.com/pages/DebuggingImportError).
86+
There are also some [general debugging tips on the PythonAnywhere help site](https://help.pythonanywhere.com/pages/DebuggingImportError).
8787

8888
And remember, your coach is here to help!

en/django_installation/instructions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ is copyrighted by Markus Zapke-Gründemann et al.
88

99
## Virtual environment
1010

11-
Before we install Django we will get you to install an extremely useful tool to help keep your coding environment tidy on your computer. It's possible to skip this step, but it's highly recommended. Starting with the best possible setup will save you a lot of trouble in the future!
11+
Before we install Django we will get you to install an extremely useful tool to help keep your coding environment tidy on your computer. It's possible to skip this step, but it's highly recommended to follow it. Starting with the best possible setup will save you a lot of trouble in the future!
1212

1313
So, let's create a **virtual environment** (also called a *virtualenv*). Virtualenv will isolate your Python/Django setup on a per-project basis. This means that any changes you make to one website won't affect any others you're also developing. Neat, right?
1414

@@ -125,7 +125,7 @@ C:\Users\Name\djangogirls> myvenv\Scripts\activate
125125
>```
126126
>C:\WINDOWS\system32> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
127127
> Execution Policy Change
128-
> The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
128+
> The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
129129
>```
130130
131131
<!-- (This comment separates the two blockquote blocks, so that GitBook and Crowdin don't merge them into a single block.) -->

en/django_orm/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ In this chapter you'll learn how Django connects to the database and stores data
77

88
A QuerySet is, in essence, a list of objects of a given Model. QuerySets allow you to read the data from the database, filter it and order it.
99

10-
It's easiest to learn by example. Let's try this, shall we?
10+
It's easier to learn by example. Let's try this, shall we?
1111

1212

1313
## Django shell

en/django_start_project/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ djangogirls
6464
```
6565
> **Note**: in your directory structure, you will also see your `myvenv` directory that we created before.
6666
67-
`manage.py` is a script that helps with management of the site. With it we will be able (amongst other things) to start a web server on our computer without installing anything else.
67+
`manage.py` is a script that helps with management of the site. With it we will be able (among other things) to start a web server on our computer without installing anything else.
6868

6969
The `settings.py` file contains the configuration of your website.
7070

@@ -77,7 +77,7 @@ Let's ignore the other files for now as we won't change them. The only thing to
7777

7878
Let's make some changes in `mysite/settings.py`. Open the file using the code editor you installed earlier.
7979

80-
**Note**: Keep in mind that `settings.py` is a regular file, like any other. You can open it from inside the code editor, using the "file -> open" menu actions. This should get you the usual window in which you can navigate to your `settings.py` file and select it. Alternatively, you can open the file by navigating to the djangogirls folder on your desktop and right-clicking on it. Then, select your code editor from the list. Selecting the editor is important as you might have other programs installed that can open the file but will not let you edit it.
80+
**Note**: Keep in mind that `settings.py` is a regular file, like any other. You can open it from inside the code editor, using the "File -> Open" menu action. This should get you the usual window in which you can navigate to your `settings.py` file and select it. Alternatively, you can open the file by navigating to the `djangogirls/` folder on your desktop and right-clicking on it. Then, select your code editor from the list. Selecting the editor is important as you might have other programs installed that can open the file but will not let you edit it.
8181

8282
It would be nice to have the correct time on our website. Go to [Wikipedia's list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) and copy your relevant time zone (TZ) (e.g. `Europe/Berlin`).
8383

@@ -102,7 +102,7 @@ We'll also need to add a path for static files. (We'll find out all about static
102102

103103
{% filename %}mysite/settings.py{% endfilename %}
104104
```python
105-
STATIC_URL = '/static/'
105+
STATIC_URL = 'static/'
106106
STATIC_ROOT = BASE_DIR / 'static'
107107
```
108108

Loading

en/extend_your_application/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ We will start with adding a link inside `blog/templates/blog/post_list.html` fil
3939

4040
{% raw %}Time to explain the mysterious `{% url 'post_detail' pk=post.pk %}`. As you might suspect, the `{% %}` notation means that we are using Django template tags. This time we will use one that will create a URL for us!{% endraw %}
4141

42-
The `post_detail` part means that Django will be expecting a URL in `blog/urls.py` with name=post_detail
42+
The `post_detail` part means that Django will be expecting a URL in `blog/urls.py` with `name=post_detail`.
4343

4444
And how about `pk=post.pk`? `pk` is short for primary key, which is a unique identifier for each record in a database. Every Django model has a field which serves as its primary key, and whatever other name it has, it can also be referred to as "pk". Because we didn't specify a primary key in our `Post` model, Django creates one for us (by default, a field named "id" holding a number that increases for each record, i.e. 1, 2, 3) and adds it as a field to each of our posts. We access the primary key by writing `post.pk`, the same way we access other fields (`title`, `author`, etc.) in our `Post` object!
4545

en/how_the_internet_works/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> For readers at home: this chapter is covered in the [How the Internet Works](https://www.youtube.com/watch?v=oM9yAA09wdc) video.
44
5-
> This chapter is inspired by the talk "How the Internet works" by Jessica McKellar (http://web.mit.edu/jesstess/www/).
5+
> This chapter is inspired by the talk "How the Internet works" by Jessica McKellar (https://web.mit.edu/jesstess/www/).
66
77
We bet you use the Internet every day. But do you actually know what happens when you type an address like https://djangogirls.org into your browser and press `enter`?
88

@@ -21,7 +21,7 @@ We drew you a picture! It looks like this:
2121

2222
![Figure 1.1](images/internet_1.png)
2323

24-
Looks like a mess, right? In fact it is a network of connected machines (the above-mentioned *servers*). Hundreds of thousands of machines! Many, many kilometers of cables around the world! You can visit a Submarine Cable Map website (http://submarinecablemap.com) to see how complicated the net is. Here is a screenshot from the website:
24+
Looks like a mess, right? In fact it is a network of connected machines (the above-mentioned *servers*). Hundreds of thousands of machines! Many, many kilometers of cables around the world! You can visit a Submarine Cable Map website (https://submarinecablemap.com) to see how complicated the net is. Here is a screenshot from the website:
2525

2626
![Figure 1.2](images/internet_3.png)
2727

@@ -39,7 +39,7 @@ Your letter goes to the post office closest to you. Then it goes to another that
3939

4040
That's how it works - you send messages and you expect some response. Instead of paper and pen you use bytes of data, but the idea is the same!
4141

42-
Instead of addresses with a street name, city, zip code and country name, we use IP addresses. Your computer first asks the DNS (Domain Name System) to translate djangogirls.org into an IP address. It works a little bit like old-fashioned phonebooks where you can look up the name of the person you want to contact and find their phone number and address.
42+
Instead of addresses with a street name, city, zip code and country name, we use IP addresses. Your computer first asks the DNS (Domain Name System) to translate `djangogirls.org` into an IP address. It works a little bit like old-fashioned phonebooks where you can look up the name of the person you want to contact and find their phone number and address.
4343

4444
When you send a letter, it needs to have certain features to be delivered correctly: an address, a stamp, etc. You also use a language that the receiver understands, right? The same applies to the *data packets* you send to see a website. We use a protocol called HTTP (Hypertext Transfer Protocol).
4545

en/html/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Before we upload all the files, let's check what `git` will be uploading (all th
189189
$ git status
190190
```
191191

192-
We're almost there, now it's time to tell it to save this change in its history. We're going to give it a "commit message" where we describe what we've changed. You can type anything you'd like at this stage, but it's helpful to type something descriptive so that you can remember what you've done in the future.
192+
We're almost there, now it's time to tell it to save this change in its history. We're going to give it a "commit message" where we describe what we've changed. You can type anything you'd like at this stage, but it's helpful to type something descriptive so that, in the future, you can remember what you've done.
193193

194194
{% filename %}command-line{% endfilename %}
195195
```
@@ -218,7 +218,7 @@ $ git pull
218218

219219
You'll need to substitute `<your-pythonanywhere-domain>` with your actual PythonAnywhere subdomain name, without the angle-brackets. Your subdomain name is normally your PythonAnywhere user name, but in some cases it might be a bit different (such as if your user name contains capital letters). So if this command doesn't work, use the `ls` (list files) command to find your actual subdomain/folder name, and then `cd` to there.
220220

221-
Now watch your code get downloaded. If you want to check that it's arrived, you can hop over to the **"Files" page** and view your code on PythonAnywhere (you can reach other PythonAnywhere pages from the menu button on the console page).
221+
Now watch your code getting downloaded. If you want to check that it's arrived, you can hop over to the **"Files" page** and view your code on PythonAnywhere (you can reach other PythonAnywhere pages from the menu button on the console page).
222222

223223

224224
* Finally, hop on over to the ["Web" page](https://www.pythonanywhere.com/web_app_setup/) and hit **Reload** on your web app.

en/intro_to_command_line/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ rmdir /S | rm -r | delete a directory | **rm
438438

439439
These are just a very few of the commands you can run in your command line, but you're not going to use anything more than that today.
440440

441-
If you're curious, [ss64.com](http://ss64.com) contains a complete reference of commands for all operating systems.
441+
If you're curious, [ss64.com](https://ss64.com) contains a complete reference of commands for all operating systems.
442442

443443
## Ready?
444444

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<!--sec data-title="Opening: macOS" data-id="macOS_prompt" data-collapse=true ces-->
2+
3+
Go to Launchpad → Other → Terminal.
4+
5+
<!--endsec-->
6+
7+
<!--sec data-title="Opening: Linux" data-id="linux_prompt" data-collapse=true ces-->
8+
9+
It's probably under Applications → Accessories → Terminal, or Applications → System → Terminal, but that may depend on your system. If it's not there, you can try to Google it. :)
10+
11+
<!--endsec-->
12+
113
<!--sec data-title="Opening: Windows" data-id="windows_prompt" data-collapse=true ces-->
214

315
Depending on your version of Windows and your keyboard, one of the following should open a command window (you may have to experiment a bit, but you don't have to try all of these suggestions):
@@ -13,15 +25,3 @@ Depending on your version of Windows and your keyboard, one of the following sho
1325
Later in this tutorial, you will need to have two command windows open at the same time. However, on some versions of Windows, if you already have one command window open and you try to open a second one using the same method, it will instead point you to the command window you already have open. Try it now on your computer and see what happens! If you only get one command window, try one of the other methods in the list above. At least one of them should result in a new command window being opened.
1426

1527
<!--endsec-->
16-
17-
<!--sec data-title="Opening: macOS" data-id="macOS_prompt" data-collapse=true ces-->
18-
19-
Go to Launchpad → Other → Terminal.
20-
21-
<!--endsec-->
22-
23-
<!--sec data-title="Opening: Linux" data-id="linux_prompt" data-collapse=true ces-->
24-
25-
It's probably under Applications → Accessories → Terminal, or Applications → System → Terminal, but that may depend on your system. If it's not there, you can try to Google it. :)
26-
27-
<!--endsec-->

en/python_installation/instructions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $ python3 --version
5151
Python {{ book.py_release }}
5252
```
5353

54-
If you have a different version of Python installed, at least {{ book.py_min_version }} (e.g. {{ book.py_min_release }}), then you don't have to upgrade. If you don't have Python installed, or if you want a different version, first check what Linux distribution you are using with the following command:
54+
If you have a different version of Python installed, at least {{ book.py_min_version }} (e.g. {{ book.py_min_release }}), then you don't have to upgrade. If you don't have Python installed, or if you want a different version, first check which Linux distribution you are using with the following command:
5555

5656
{% filename %}command-line{% endfilename %}
5757
```
@@ -108,7 +108,7 @@ Python {{ book.py_release }}
108108
```
109109
The version shown may be different from {{ book.py_release }} -- it should match the version you installed.
110110

111-
**NOTE:** If you're on Windows and you get an error message that `python3` wasn't found, try using `python` (without the `3`) and check if it still might be a version of Python that is {{ book.py_min_version }} or higher. If that doesn't work either, you may open a new command prompt and try again; this happens if you use a command prompt left open from before the Python installation.
111+
**NOTE:** If you're on Windows and you get an error message that `python3` wasn't found, try using `python` (without the `3`) and check if it still might be a version of Python that is {{ book.py_min_version }} or higher. If that doesn't work either, you may open a new command prompt and try again; this happens if you use a command prompt that was opened before the Python installation.
112112

113113
----
114114

en/python_introduction/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ Which would print:
988988

989989
`range` is a function that creates a list of numbers following one after the other (these numbers are provided by you as parameters).
990990

991-
Note that the second of these two numbers is not included in the list that is output by Python (meaning `range(1, 6)` counts from 1 to 5, but does not include the number 6). That is because "range" is half-open, and by that we mean it includes the first value, but not the last.
991+
Note that the second of these two numbers is not included in the list that is output by Python (meaning `range(1, 6)` counts from 1 to 5, but does not include the number 6). That is because `range` is half-open, and by that we mean it includes the first value, but not the last.
992992

993993
## Summary
994994

0 commit comments

Comments
 (0)