Skip to content

Commit d9e95e7

Browse files
Updating python and django versions usage to latest available versions
1 parent 12022c6 commit d9e95e7

File tree

33 files changed

+40
-40
lines changed

33 files changed

+40
-40
lines changed

book.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"variables": {
44
"py_version": "3.12",
55
"py_release": "3.12.3",
6-
"py_min_version": "3.9",
7-
"py_min_release": "3.9.19",
6+
"py_min_version": "3.10",
7+
"py_min_release": "3.10.13",
88
"pa_py_version": "3.10",
9-
"django_version": "4.2.11"
9+
"django_version": "5.1.2"
1010
},
1111
"links": {
1212
},

de/deploy/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Um eine Web App auf PythonAnywhere publizieren zu können, muss dein Code von Gi
171171

172172
{% filename %}PythonAnywhere command-line{% endfilename %}
173173

174-
$ pip3.8 install --user pythonanywhere
174+
$ pip install --user pythonanywhere
175175

176176

177177
Nach diesem Befehl solltest du in etwa Folgendes sehen: `Collecting pythonanywhere`, und irgendwann den Schluss `Successfully installed (...) pythonanywhere- (...)`.
@@ -180,7 +180,7 @@ Nun können wir mit dem Hilfstool unsere App von GitHub automatisch konfiguriere
180180

181181
{% filename %}PythonAnywhere command-line{% endfilename %}
182182

183-
$ pa_autoconfigure_django.py --python=3.8 https://github.com/<your-github-username>/my-first-blog.git
183+
$ pa_autoconfigure_django.py --python=3.10 https://github.com/<your-github-username>/my-first-blog.git
184184

185185

186186
Während du die Ausführung verfolgst, wirst du sehen, was passiert:

en/deploy/pythonanywhere.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You can also go to the "Files" page and navigate around using PythonAnywhere's b
6868
Your site should now be live on the public Internet! Click through to the PythonAnywhere "Web" page to get a link to it. You can share this with anyone you want. :)
6969

7070

71-
> **Note** This is a beginners' tutorial, and in deploying this site we've taken a few shortcuts which aren't ideal from a security point of view. If and when you decide to build on this project, or start a new project, you should review the [Django deployment checklist](https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/) for some tips on securing your site.
71+
> **Note** This is a beginners' tutorial, and in deploying this site we've taken a few shortcuts which aren't ideal from a security point of view. If and when you decide to build on this project, or start a new project, you should review the [Django deployment checklist](https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/) for some tips on securing your site.
7272
7373
## Debugging tips
7474

en/django_admin/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ Make sure that at least two or three posts (but not all) have the publish date s
5252

5353
![Django admin](images/edit_post3.png)
5454

55-
If you want to know more about Django admin, you should check Django's documentation: https://docs.djangoproject.com/en/4.2/ref/contrib/admin/
55+
If you want to know more about Django admin, you should check Django's documentation: https://docs.djangoproject.com/en/5.1/ref/contrib/admin/
5656

5757
This is probably a good moment to grab a coffee (or tea) or something to eat to re-energize yourself. You created your first Django model – you deserve a little break!

en/django_forms/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ Feel free to change the title or the text and save the changes!
374374

375375
Congratulations! Your application is getting more and more complete!
376376

377-
If you need more information about Django forms, you should read the documentation: https://docs.djangoproject.com/en/4.2/topics/forms/
377+
If you need more information about Django forms, you should read the documentation: https://docs.djangoproject.com/en/5.1/topics/forms/
378378

379379
## Security
380380

en/django_models/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Now we define the properties we were talking about: `title`, `text`, `created_da
164164
- `models.DateTimeField` – this is a date and time.
165165
- `models.ForeignKey` – this is a link to another model.
166166

167-
We will not explain every bit of code here since it would take too much time. You should take a look at Django's documentation if you want to know more about Model fields and how to define things other than those described above (https://docs.djangoproject.com/en/3.2/ref/models/fields/#field-types).
167+
We will not explain every bit of code here since it would take too much time. You should take a look at Django's documentation if you want to know more about Model fields and how to define things other than those described above (https://docs.djangoproject.com/en/5.1/ref/models/fields/#field-types).
168168

169169
What about `def publish(self):`? This is exactly the `publish` method we were talking about before. `def` means that this is a function/method and `publish` is the name of the method. You can change the name of the method if you want. The naming rule is that we use lowercase and underscores instead of spaces. For example, a method that calculates average price could be called `calculate_average_price`.
170170

en/django_start_project/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ In `settings.py`, find the line that contains `TIME_ZONE` and modify it to choos
8888
TIME_ZONE = 'Europe/Berlin'
8989
```
9090

91-
A language code consist of the language, e.g. `en` for English or `de` for German, and the country code, e.g. `de` for Germany or `ch` for Switzerland. If English is not your native language, you can add this to change the default buttons and notifications from Django to be in your language. So you would have "Cancel" button translated into the language you defined here. [Django comes with a lot of prepared translations](https://docs.djangoproject.com/en/4.2/ref/settings/#language-code).
91+
A language code consist of the language, e.g. `en` for English or `de` for German, and the country code, e.g. `de` for Germany or `ch` for Switzerland. If English is not your native language, you can add this to change the default buttons and notifications from Django to be in your language. So you would have "Cancel" button translated into the language you defined here. [Django comes with a lot of prepared translations](https://docs.djangoproject.com/en/5.1/ref/settings/#language-code).
9292

9393
If you want a different language, change the language code by changing the following line:
9494

en/django_urls/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ Your console is showing an error, but don't worry – it's actually pretty usefu
112112
If you see a different error message, try restarting your web server. To do that, in the console window that is running the web server, stop it by pressing Ctrl+C (the Control and C keys together). On Windows, you might have to press Ctrl+Break. Then you need to restart the web server by running a `python manage.py runserver` command.
113113

114114

115-
> If you want to know more about Django URLconfs, look at the official documentation: https://docs.djangoproject.com/en/4.2/topics/http/urls/
115+
> If you want to know more about Django URLconfs, look at the official documentation: https://docs.djangoproject.com/en/5.1/topics/http/urls/

en/django_views/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ Another error! Read what's going on now:
3939

4040
This shows that the server is running again, at least, but it still doesn't look right, does it? Don't worry, it's just an error page, nothing to be scared of! Just like the error messages in the console, these are actually pretty useful. You can read that the *TemplateDoesNotExist*. Let's fix this bug and create a template in the next chapter!
4141

42-
> Learn more about Django views by reading the official documentation: https://docs.djangoproject.com/en/4.2/topics/http/views/
42+
> Learn more about Django views by reading the official documentation: https://docs.djangoproject.com/en/5.1/topics/http/views/

en/dynamic_data_in_templates/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ def post_list(request):
7575

7676
That's it! Time to go back to our template and display this QuerySet!
7777

78-
Want to read a little bit more about QuerySets in Django? You should look here: https://docs.djangoproject.com/en/3.2/ref/models/querysets/
78+
Want to read a little bit more about QuerySets in Django? You should look here: https://docs.djangoproject.com/en/5.1/ref/models/querysets/

en/whats_next/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Yes! There are a _lot_ of resources online for learning all kinds of programming
1414

1515
#### Django
1616
- Our other book, [Django Girls Tutorial: Extensions](https://tutorial-extensions.djangogirls.org/)
17-
- [Django's official tutorial](https://docs.djangoproject.com/en/4.2/intro/tutorial01/)
17+
- [Django's official tutorial](https://docs.djangoproject.com/en/5.1/intro/tutorial01/)
1818
- [Getting Started With Django video lessons](http://www.gettingstartedwithdjango.com/)
1919
- [Django for Everybody Specialization](https://www.coursera.org/specializations/django) – some video lectures can be audited for free and you can earn a Coursera Certificate by taking these courses
2020

fa/deploy/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171

172172
{% filename %}خط فرمان PythonAnywhere {% endfilename %}
173173

174-
$ pip3.8 install --user pythonanywhere
174+
$ pip install --user pythonanywhere
175175

176176

177177
این دستور باید چیزهایی شبیه به `Collecting pythonanywhere` بر روی صفحه نشان دهد و در انتها نیز این پیغام `Successfully installed (...) pythonanywhere- (...)` نمایش داده خواهد شد.
@@ -180,7 +180,7 @@
180180

181181
{% filename %}خط فرمان PythonAnywhere {% endfilename %}
182182

183-
$ pa_autoconfigure_django.py --python=3.8 https://github.com/<your-github-username>/my-first-blog.git
183+
$ pa_autoconfigure_django.py --python=3.10 https://github.com/<your-github-username>/my-first-blog.git
184184

185185

186186
همینطور که به اجراشدن آن نگاه می‌کنید می‌توانید بفهمید که چه کاری انجام می‌دهد:

fr/deploy/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Pour déployer une application sur PythonAnywhere, vous devez y télécharger vo
175175

176176
{% filename %}PythonAnywhere command-line{% endfilename %}
177177

178-
$ pip3.8 install --user pythonanywhere
178+
$ pip install --user pythonanywhere
179179

180180

181181
Vous devriez voir quelque chose comme `Collecting pythonanywhere`, et au bout d'un moment une dernière ligne disant `Successfully installed (...) pythonanywhere-(...)`.
@@ -184,7 +184,7 @@ Maintenant, nous exécutez l'assistant pour configurer automatiquement votre app
184184

185185
{% filename %}PythonAnywhere command-line{% endfilename %}
186186

187-
$ pa_autoconfigure_django.py --python=3.8 https://github.com/<your-github-username>/my-first-blog.git
187+
$ pa_autoconfigure_django.py --python=3.10 https://github.com/<your-github-username>/my-first-blog.git
188188

189189

190190
En regardant la commande s'exécuter, vous devriez voir ce qui ce passe:

hy/deploy/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ PythonAnywhere- ում վեբ հավելվածի տեղադրումը ենթադ
157157

158158
{% filename %}PythonAnywhere command-line{% endfilename %}
159159

160-
$ pip3.8 install --user pythonanywhere
160+
$ pip install --user pythonanywhere
161161

162162

163163
Վահանակը պետք է տպի նման մի բան, ինչպիսին է `Collecting pythonanywhere` և վերջում `Successfully installed (...) pythonanywhere- (...)`.
@@ -166,7 +166,7 @@ PythonAnywhere- ում վեբ հավելվածի տեղադրումը ենթադ
166166

167167
{% filename %}PythonAnywhere command-line{% endfilename %}
168168

169-
$ pa_autoconfigure_django.py --python=3.8 https://github.com/<your-github-username>/my-first-blog.git
169+
$ pa_autoconfigure_django.py --python=3.10 https://github.com/<your-github-username>/my-first-blog.git
170170

171171

172172
Երբ տեսնեք, թե ինչպես է այն աշխատում, կարող եք հասկանալ, թե կոնկրետ ինչ է այն անում.

it/deploy/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Per implementare un'applicazione web su PythonAnywhere devi prendere il codice d
171171

172172
{% filename %}PythonAnywhere command-line{% endfilename %}
173173

174-
$ pip3.8 install --user pythonanywhere
174+
$ pip install --user pythonanywhere
175175

176176

177177
Ora dovresti leggere: `Collecting pythonanywhere` e un'eventuale riga finale che dice `Successfully installed (...) pythonanywhere- (...)`.
@@ -180,7 +180,7 @@ Ora eseguiamo l'helper per configurare automaticamente la nostra applicazione da
180180

181181
{% filename %}PythonAnywhere command-line{% endfilename %}
182182

183-
$ pa_autoconfigure_django.py --python=3.8 https://github.com/<your-github-username>/my-first-blog.git
183+
$ pa_autoconfigure_django.py --python=3.10 https://github.com/<your-github-username>/my-first-blog.git
184184

185185

186186
Guardando l'esecuzione, potrai vedere cosa sta facendo:

ja/deploy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ PythonAnywhereのコードを`ls`を使って見てみることもできます
196196

197197
あなたのサイトは現在、インターネット上で動作しているはずです! PythonAnywhereのWebページをクリックしてリンクを取得します。 あなたはあなたが望む誰とでもこれを共有することができます:)
198198

199-
> **** これは初心者向けのチュートリアルです。このサイトをデプロイする際にはセキュリティの観点からは理想的ではない、いくつかのショートカットをしました。 もしこのプロジェクトを利用すると決めたり、新しいプロジェクトを開始する場合は、あなたのサイトを安全にするいくつかのヒントについて、[Djangoデプロイチェックリスト](https://docs.djangoproject.com/ja/3.2/howto/deployment/checklist/)を注意深く読んでください。
199+
> **** これは初心者向けのチュートリアルです。このサイトをデプロイする際にはセキュリティの観点からは理想的ではない、いくつかのショートカットをしました。 もしこのプロジェクトを利用すると決めたり、新しいプロジェクトを開始する場合は、あなたのサイトを安全にするいくつかのヒントについて、[Djangoデプロイチェックリスト](https://docs.djangoproject.com/ja/5.1/howto/deployment/checklist/)を注意深く読んでください。
200200
201201
## デバッギングのヒント
202202

ja/django_admin/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ Postsをクリックして移動し、少し試してみましょう。 5つか6
5252

5353
![Django admin](images/edit_post3.png)
5454

55-
Django adminについてもっと知りたいときは、Djangoのドキュメントを見るとよいでしょう。https://docs.djangoproject.com/ja/3.2/ref/contrib/admin/
55+
Django adminについてもっと知りたいときは、Djangoのドキュメントを見るとよいでしょう。https://docs.djangoproject.com/ja/5.1/ref/contrib/admin/
5656

5757
ここでそろそろコーヒー(または紅茶)か何か食べるものを摂って自分を元気づけるのにいいタイミングでしょう。最初のDjangoモデルを作ったのだから、少し休みをとっていいところです!

ja/django_forms/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ form = PostForm(instance=post)
370370

371371
おめでとう!アプリケーションが完成しました。
372372

373-
Djangoのフォームについてもっと知りたい場合、Djangoのドキュメントを読んでください。https://docs.djangoproject.com/ja/3.2/topics/forms/
373+
Djangoのフォームについてもっと知りたい場合、Djangoのドキュメントを読んでください。https://docs.djangoproject.com/ja/5.1/topics/forms/
374374

375375
## セキュリティ
376376

ja/django_models/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Post(models.Model):
162162
- `models.DateTimeField` – 日付と時間のフィールド
163163
- `models.ForeignKey` – これは他のモデルへのリンク
164164

165-
コードの細かいところまでは説明し出すと時間がかかるので、ここではしませんが、 モデルのフィールドや上記以外の定義のやり方について知りたい方は是非Djangoドキュメントを見てみて下さい。 (https://docs.djangoproject.com/ja/3.2/ref/models/fields/#field-types)
165+
コードの細かいところまでは説明し出すと時間がかかるので、ここではしませんが、 モデルのフィールドや上記以外の定義のやり方について知りたい方は是非Djangoドキュメントを見てみて下さい。 (https://docs.djangoproject.com/ja/5.1/ref/models/fields/#field-types)
166166

167167
`def publish(self):` は何かと言うと、 これこそが先程お話ししたブログを公開するメソッドそのものです。 `def` は、これはファンクション(関数)/メソッドという意味です。`publish` はメソッドの名前で、 変えることもできます。 メソッドの名前に使っていいのは、英小文字とアンダースコアで、アンダースコアはスペースの代わりに使います。 (例えば、平均価格を計算するメソッドは `calculate_average_price` っていう名前にします)
168168

ja/django_start_project/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ django-admin.py は、必要なディレクトリとファイルを作成する
8282
TIME_ZONE = 'Asia/Tokyo'
8383
```
8484

85-
言語コードは、言語(例えば、英語の場合は`en`、ドイツ語の場合は`de`のように表します)と、国コード(例えば、ドイツの場合は`de`、スイスの場合は`ch`のように表します)からできています。 あなたの母国語が英語でない場合、これを追加すると、Djangoのデフォルトのボタンや通知が設定した言語に変更されます。 ですのでたとえば「Cancel」ボタンがここで定義した言語に翻訳されます。 [Djangoは多くの言語に対応しています。](https://docs.djangoproject.com/ja/3.2/ref/settings/#language-code)
85+
言語コードは、言語(例えば、英語の場合は`en`、ドイツ語の場合は`de`のように表します)と、国コード(例えば、ドイツの場合は`de`、スイスの場合は`ch`のように表します)からできています。 あなたの母国語が英語でない場合、これを追加すると、Djangoのデフォルトのボタンや通知が設定した言語に変更されます。 ですのでたとえば「Cancel」ボタンがここで定義した言語に翻訳されます。 [Djangoは多くの言語に対応しています。](https://docs.djangoproject.com/ja/5.1/ref/settings/#language-code)
8686

8787
別の言語を使用する場合は、次の行を変更して言語コードを変更します。
8888

ja/django_urls/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ urlpatterns = [
100100

101101
エラーが表示されていますね。でも心配しないで。これはむしろ、結構便利なものなんですよ:ここでは、**'post_list' という属性(attribute)がない**ことを知らせてくれています。 これは *ビュー* の名前で、Djangoが探して使おうとしましたが、私たちはこれをまだ作っていませんでした。 現時点では、`/admin/` も動作していないと思います。 心配しなくて大丈夫です。ちゃんとできますから。 別のエラーメッセージが表示された場合は、Webサーバーを再起動してみてください。 これを行うには、Webサーバーを実行しているコンソールウィンドウで、Ctrl + C(CtrlキーとCキーを同時に押す)で停止します。 Windowsの場合、Ctrl + Breakかもしれません。 その後、`python manage.py runserver`を実行してWebサーバーを再起動します。
102102

103-
> Django URLconfについてもっと知りたい場合は、公式のドキュメントを見て下さい。 https://docs.djangoproject.com/ja/3.2/topics/http/urls/
103+
> Django URLconfについてもっと知りたい場合は、公式のドキュメントを見て下さい。 https://docs.djangoproject.com/ja/5.1/topics/http/urls/

ja/django_views/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ def post_list(request):
4141

4242
サーバーは実行されていることはわかるのですが、正しく表示されないのはなぜでしょう? 心配しないで!ただのエラーページです! コンソールでのエラーメッセージと同じように、これは実際にかなり便利です。 *TemplateDoesNotExist* と書いてありますね。 それでは次の章でテンプレートを作って、エラーを解決しましょう!
4343

44-
> Djangoのビューについてもっと知りたいのなら、公式ドキュメントをぜひ読んでみてください。 https://docs.djangoproject.com/ja/3.2/topics/http/views/
44+
> Djangoのビューについてもっと知りたいのなら、公式ドキュメントをぜひ読んでみてください。 https://docs.djangoproject.com/ja/5.1/topics/http/views/

ja/dynamic_data_in_templates/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ def post_list(request):
7878

7979
どうでしたか?次は、このクエリセットをテンプレートで表示させるところを、やってみましょう。
8080

81-
Djangoのクエリセットについて、もっと知りたければこちらも読んでみてくださいね。 https://docs.djangoproject.com/ja/3.2/ref/models/querysets/
81+
Djangoのクエリセットについて、もっと知りたければこちらも読んでみてくださいね。 https://docs.djangoproject.com/ja/5.1/ref/models/querysets/

0 commit comments

Comments
 (0)