diff --git a/book.json b/book.json index f7d21fd147c..819d89ec3ce 100644 --- a/book.json +++ b/book.json @@ -3,10 +3,10 @@ "variables": { "py_version": "3.12", "py_release": "3.12.3", - "py_min_version": "3.9", - "py_min_release": "3.9.19", + "py_min_version": "3.10", + "py_min_release": "3.10.13", "pa_py_version": "3.10", - "django_version": "4.2.11" + "django_version": "5.1.2" }, "links": { }, diff --git a/de/deploy/README.md b/de/deploy/README.md index f1478c9bd20..39822c0638e 100644 --- a/de/deploy/README.md +++ b/de/deploy/README.md @@ -171,7 +171,7 @@ Um eine Web App auf PythonAnywhere publizieren zu können, muss dein Code von Gi {% filename %}PythonAnywhere command-line{% endfilename %} - $ pip3.8 install --user pythonanywhere + $ pip install --user pythonanywhere 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 {% filename %}PythonAnywhere command-line{% endfilename %} - $ pa_autoconfigure_django.py --python=3.8 https://github.com//my-first-blog.git + $ pa_autoconfigure_django.py --python=3.10 https://github.com//my-first-blog.git Während du die Ausführung verfolgst, wirst du sehen, was passiert: diff --git a/de/django_forms/README.md b/de/django_forms/README.md index 9968e6ea163..eaaea05d302 100644 --- a/de/django_forms/README.md +++ b/de/django_forms/README.md @@ -60,7 +60,7 @@ Es ist an der Zeit, `blog/templates/blog/base.html` im Code-Editor zu öffnen. J Beachte, dass wir unsere neue View `post_new` nennen wollen. Das [SVG-Icon](https://icons.getbootstrap.com/icons/file-earmark-plus/) wird von [Bootstrap Icons](https://icons.getbootstrap.com/) zur Verfügung gestellt und zeigt ein Seitensymbol mit Pluszeichen an. Wir verwenden eine Django-Template-Direktive namens `include`. Dadurch wird der Inhalt der Datei in das Django-Template eingefügt. Der Web-Browser weiß, wie man diese Art von Inhalt ohne weitere Verarbeitung handhabt. -> Alle Bootstrap-Icons kannst du [hier herunterladen](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip). Entpacke die Datei und kopiere alle SVG-Bilddateien in einen neuen Ordner namens `icons` innerhalb von `blog/templates/blog/`. So kannst du auf ein Symbol wie `pencil-fill.svg` mit dem Dateipfad `blog/templates/blog/icons/pencil-fill.svg` zugreifen +> Alle Bootstrap-Icons kannst du [hier herunterladen](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip). Entpacke die Datei und kopiere alle SVG-Bilddateien in einen neuen Ordner namens `icons` innerhalb von `blog/templates/blog/`. So kannst du auf ein Symbol wie `pencil-fill.svg` mit dem Dateipfad `blog/templates/blog/icons/pencil-fill.svg` zugreifen Nach dem Bearbeiten der Zeile sieht deine HTML-Datei so aus: diff --git a/en/css/README.md b/en/css/README.md index 4c984e00ac0..abb2dea8296 100644 --- a/en/css/README.md +++ b/en/css/README.md @@ -20,7 +20,7 @@ To install Bootstrap, open up your `.html` file in the code editor and add this {% filename %}blog/templates/blog/post_list.html{% endfilename %} ```html - + ``` This doesn't add any files to your project. It just points to files that exist on the Internet. So go ahead, open your website and refresh the page. Here it is! @@ -119,7 +119,7 @@ Your file should now look like this: Django Girls blog - + diff --git a/en/deploy/images/new_github_repo.png b/en/deploy/images/new_github_repo.png index d1f82e5d863..997b7fe129c 100644 Binary files a/en/deploy/images/new_github_repo.png and b/en/deploy/images/new_github_repo.png differ diff --git a/en/deploy/pythonanywhere.md b/en/deploy/pythonanywhere.md index d67d7fb062d..9923f641dee 100644 --- a/en/deploy/pythonanywhere.md +++ b/en/deploy/pythonanywhere.md @@ -68,7 +68,7 @@ You can also go to the "Files" page and navigate around using PythonAnywhere's b 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. :) -> **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. +> **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. ## Debugging tips diff --git a/en/django_admin/README.md b/en/django_admin/README.md index 3cd1c05a965..1a8bda07c5a 100644 --- a/en/django_admin/README.md +++ b/en/django_admin/README.md @@ -52,6 +52,6 @@ Make sure that at least two or three posts (but not all) have the publish date s ![Django admin](images/edit_post3.png) -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/ +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/ 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! diff --git a/en/django_forms/README.md b/en/django_forms/README.md index 8645aaceb78..a669bea5136 100644 --- a/en/django_forms/README.md +++ b/en/django_forms/README.md @@ -59,7 +59,7 @@ It's time to open `blog/templates/blog/base.html` in the code editor. Now we can Note that we want to call our new view `post_new`. The [SVG icon](https://icons.getbootstrap.com/icons/file-earmark-plus/) is provided by the [Bootstrap Icons](https://icons.getbootstrap.com/) and it will display a page icon with plus sign. We use a Django template directive called `include`. This will inject the file's content into the Django template. The web browser knows how to handle this type of content without any further processing. -> You can download all the Bootstrap icons [here](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip). Unzip the file and copy all the SVG image files into a new folder inside `blog/templates/blog/` called `icons`. That way you can access an icon like `pencil-fill.svg` using the file path `blog/templates/blog/icons/pencil-fill.svg` +> You can download all the Bootstrap icons [here](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip). Unzip the file and copy all the SVG image files into a new folder inside `blog/templates/blog/` called `icons`. That way you can access an icon like `pencil-fill.svg` using the file path `blog/templates/blog/icons/pencil-fill.svg` After editing the line, your HTML file should now look like this: @@ -70,7 +70,7 @@ After editing the line, your HTML file should now look like this: Django Girls blog - + @@ -374,7 +374,7 @@ Feel free to change the title or the text and save the changes! Congratulations! Your application is getting more and more complete! -If you need more information about Django forms, you should read the documentation: https://docs.djangoproject.com/en/4.2/topics/forms/ +If you need more information about Django forms, you should read the documentation: https://docs.djangoproject.com/en/5.1/topics/forms/ ## Security diff --git a/en/django_models/README.md b/en/django_models/README.md index 39681112642..9f4b3bcfb82 100644 --- a/en/django_models/README.md +++ b/en/django_models/README.md @@ -164,7 +164,7 @@ Now we define the properties we were talking about: `title`, `text`, `created_da - `models.DateTimeField` – this is a date and time. - `models.ForeignKey` – this is a link to another model. -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). +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). 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`. diff --git a/en/django_start_project/README.md b/en/django_start_project/README.md index 1031dd672cf..cb4c552d0e1 100644 --- a/en/django_start_project/README.md +++ b/en/django_start_project/README.md @@ -88,7 +88,7 @@ In `settings.py`, find the line that contains `TIME_ZONE` and modify it to choos TIME_ZONE = 'Europe/Berlin' ``` -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). +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). If you want a different language, change the language code by changing the following line: diff --git a/en/django_urls/README.md b/en/django_urls/README.md index acb3a95c4d8..961d3a0ea01 100644 --- a/en/django_urls/README.md +++ b/en/django_urls/README.md @@ -112,4 +112,4 @@ Your console is showing an error, but don't worry – it's actually pretty usefu 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. -> If you want to know more about Django URLconfs, look at the official documentation: https://docs.djangoproject.com/en/4.2/topics/http/urls/ +> If you want to know more about Django URLconfs, look at the official documentation: https://docs.djangoproject.com/en/5.1/topics/http/urls/ diff --git a/en/django_views/README.md b/en/django_views/README.md index 340beb94026..fe20ba7bb7d 100644 --- a/en/django_views/README.md +++ b/en/django_views/README.md @@ -39,4 +39,4 @@ Another error! Read what's going on now: 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! -> Learn more about Django views by reading the official documentation: https://docs.djangoproject.com/en/4.2/topics/http/views/ +> Learn more about Django views by reading the official documentation: https://docs.djangoproject.com/en/5.1/topics/http/views/ diff --git a/en/dynamic_data_in_templates/README.md b/en/dynamic_data_in_templates/README.md index f1d9052a056..450c82bed98 100644 --- a/en/dynamic_data_in_templates/README.md +++ b/en/dynamic_data_in_templates/README.md @@ -75,4 +75,4 @@ def post_list(request): That's it! Time to go back to our template and display this QuerySet! -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/ +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/ diff --git a/en/python_installation/images/python-installation-options.png b/en/python_installation/images/python-installation-options.png index a0a6c65d81d..a6e9850cdc6 100644 Binary files a/en/python_installation/images/python-installation-options.png and b/en/python_installation/images/python-installation-options.png differ diff --git a/en/template_extending/README.md b/en/template_extending/README.md index 8211bd3ff38..7fd9ab86ba7 100644 --- a/en/template_extending/README.md +++ b/en/template_extending/README.md @@ -27,7 +27,7 @@ Then open it up in the code editor and copy everything from `post_list.html` to Django Girls blog - + diff --git a/en/whats_next/README.md b/en/whats_next/README.md index e10f223a45f..d946bd8ac23 100644 --- a/en/whats_next/README.md +++ b/en/whats_next/README.md @@ -14,7 +14,7 @@ Yes! There are a _lot_ of resources online for learning all kinds of programming #### Django - Our other book, [Django Girls Tutorial: Extensions](https://tutorial-extensions.djangogirls.org/) -- [Django's official tutorial](https://docs.djangoproject.com/en/4.2/intro/tutorial01/) +- [Django's official tutorial](https://docs.djangoproject.com/en/5.1/intro/tutorial01/) - [Getting Started With Django video lessons](http://www.gettingstartedwithdjango.com/) - [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 diff --git a/fa/deploy/README.md b/fa/deploy/README.md index f9ff5947e75..4e1da3bf295 100644 --- a/fa/deploy/README.md +++ b/fa/deploy/README.md @@ -171,7 +171,7 @@ {% filename %}خط فرمان PythonAnywhere {% endfilename %} - $ pip3.8 install --user pythonanywhere + $ pip install --user pythonanywhere این دستور باید چیزهایی شبیه به `Collecting pythonanywhere` بر روی صفحه نشان دهد و در انتها نیز این پیغام `Successfully installed (...) pythonanywhere- (...)` نمایش داده خواهد شد. @@ -180,7 +180,7 @@ {% filename %}خط فرمان PythonAnywhere {% endfilename %} - $ pa_autoconfigure_django.py --python=3.8 https://github.com//my-first-blog.git + $ pa_autoconfigure_django.py --python=3.10 https://github.com//my-first-blog.git همینطور که به اجراشدن آن نگاه می‌کنید می‌توانید بفهمید که چه کاری انجام می‌دهد: diff --git a/fa/django_forms/README.md b/fa/django_forms/README.md index 4f696368d76..ef7ef374dec 100644 --- a/fa/django_forms/README.md +++ b/fa/django_forms/README.md @@ -60,7 +60,7 @@ class PostForm(forms.ModelForm): توجه داشته باشید که ما می‌خواهیم نام ویو جدید را `post_new` بگذاریم. آیتم [SVG icon](https://icons.getbootstrap.com/icons/file-earmark-plus/) توسط [Bootstrap Icons](https://icons.getbootstrap.com/) ارائه می‌شود و علامتی مانند یک صفحه به همراه یک علامت به اضافه، نشان خواهد داد. ما از یک هدایت‌کننده جنگو یا Django template directive، به اسم `include` استفاده می‌کنیم. این هدایت‌کننده محتوای یک فایل را به تمپلیت جنگو تزریق می‌کند. مرورگر وب به خوبی می‌تواند این نوع از محتوا را بدون پردازش‌های اضافه، مدیریت کند. -> شما می‌توانید تمام آیکون‌های بوتسترپ را از [اینجا](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip) دانلود کنید. فایل را از حالت زیپ خارج کنید و همه تصاویر را در پوشه‌ای به نام `icons` در داخل پوشه `blog/templates/blog/` قرار دهید. به این روش شما می‌توانید به آیکونی مانند `pencil-fill.svg` از طریق آدرس `blog/templates/blog/icons/pencil-fill.svg`، دسترسی داشته باشید +> شما می‌توانید تمام آیکون‌های بوتسترپ را از [اینجا](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip) دانلود کنید. فایل را از حالت زیپ خارج کنید و همه تصاویر را در پوشه‌ای به نام `icons` در داخل پوشه `blog/templates/blog/` قرار دهید. به این روش شما می‌توانید به آیکونی مانند `pencil-fill.svg` از طریق آدرس `blog/templates/blog/icons/pencil-fill.svg`، دسترسی داشته باشید بعد از اصلاح این خط، فایل شما باید به این شکل باشد: diff --git a/fr/deploy/README.md b/fr/deploy/README.md index d4e8195ee41..aec1afdd53d 100755 --- a/fr/deploy/README.md +++ b/fr/deploy/README.md @@ -175,7 +175,7 @@ Pour déployer une application sur PythonAnywhere, vous devez y télécharger vo {% filename %}PythonAnywhere command-line{% endfilename %} - $ pip3.8 install --user pythonanywhere + $ pip install --user pythonanywhere 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 {% filename %}PythonAnywhere command-line{% endfilename %} - $ pa_autoconfigure_django.py --python=3.8 https://github.com//my-first-blog.git + $ pa_autoconfigure_django.py --python=3.10 https://github.com//my-first-blog.git En regardant la commande s'exécuter, vous devriez voir ce qui ce passe: diff --git a/fr/django_forms/README.md b/fr/django_forms/README.md index 97c9cf19845..d323b2c9c98 100755 --- a/fr/django_forms/README.md +++ b/fr/django_forms/README.md @@ -60,7 +60,7 @@ Il est temps d'ouvrir `blog/templates/blog/base.html` dans l'éditeur de code. M Remarquez que notre nouvelle vue s'appelle `post_new`. L'icône [SVG](https://icons.getbootstrap.com/icons/file-earmark-plus/) est fournie par les [icônes Bootstrap](https://icons.getbootstrap.com/) et elle affichera une icône de page avec le signe plus. Nous utilisons une directive de modèle Django appelée `include`. Cela injectera le contenu du fichier dans le template Django. Le navigateur web sait comment gérer ce type de contenu sans aucun traitement supplémentaire. -> Vous pouvez télécharger toutes les icônes Bootstrap [ici](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip). Décompressez le fichier et copiez tous les fichiers image SVG vers un nouveau dossier dans `blog/templates/blog/` intitulé `icons`. De cette façon, vous pouvez accéder à une icône comme `pencil-fill.svg` en référençant le chemin du fichier `blog/templates/blog/icons/pencil-fill.svg` +> Vous pouvez télécharger toutes les icônes Bootstrap [ici](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip). Décompressez le fichier et copiez tous les fichiers image SVG vers un nouveau dossier dans `blog/templates/blog/` intitulé `icons`. De cette façon, vous pouvez accéder à une icône comme `pencil-fill.svg` en référençant le chemin du fichier `blog/templates/blog/icons/pencil-fill.svg` Après avoir ajouté cette ligne, votre fichier HTML devrait maintenant ressembler à ceci : diff --git a/hy/deploy/README.md b/hy/deploy/README.md index f2cee3fe7e6..848f51464c5 100644 --- a/hy/deploy/README.md +++ b/hy/deploy/README.md @@ -157,7 +157,7 @@ PythonAnywhere- ում վեբ հավելվածի տեղադրումը ենթադ {% filename %}PythonAnywhere command-line{% endfilename %} - $ pip3.8 install --user pythonanywhere + $ pip install --user pythonanywhere Վահանակը պետք է տպի նման մի բան, ինչպիսին է `Collecting pythonanywhere` և վերջում `Successfully installed (...) pythonanywhere- (...)`. @@ -166,7 +166,7 @@ PythonAnywhere- ում վեբ հավելվածի տեղադրումը ենթադ {% filename %}PythonAnywhere command-line{% endfilename %} - $ pa_autoconfigure_django.py --python=3.8 https://github.com//my-first-blog.git + $ pa_autoconfigure_django.py --python=3.10 https://github.com//my-first-blog.git Երբ տեսնեք, թե ինչպես է այն աշխատում, կարող եք հասկանալ, թե կոնկրետ ինչ է այն անում. diff --git a/hy/django_forms/README.md b/hy/django_forms/README.md index 19200a6557a..0b22cb8ad61 100644 --- a/hy/django_forms/README.md +++ b/hy/django_forms/README.md @@ -62,7 +62,7 @@ Codeամանակն է ծածկագրի խմբագրում բացել `blog/templ Նկատի ունեցեք, որ մենք ուզում ենք մեր նոր տեսակետը կոչել ` post_new `: [SVG icon](https://icons.getbootstrap.com/icons/file-earmark-plus/) տրամադրվում է [Bootstrap Icons ](https://icons.getbootstrap.com/) կողմից, և դրանում կցուցադրվի էջի պատկերակ `գումարած նշանով: Մենք օգտագործում ենք Django ձևանմուշի դիրեկտիվը, որը կոչվում է `include `: Սա ֆայլի պարունակությունը կներարկի Django ձևանմուշում: Վեբ զննարկիչը գիտի, թե ինչպես վարվել այս տեսակի բովանդակության հետ `առանց հետագա մշակման: -> Bootstrap- ի բոլոր պատկերակները կարող եք ներբեռնել [ here](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip): Անջատեք ֆայլը և պատճենեք բոլոր SVG պատկերային ֆայլերը ` blog/templates/blog/ ` ներսում գտնվող նոր պանակի մեջ, որը կոչվում է ` icons `: Այդ կերպ Դուք կարող եք մուտք գործել ` pencil-fill.svg ` պես պատկերակ ՝ օգտագործելով ֆայլի ուղի `blog/templates/blog/icons/pencil-fill.svg ` +> Bootstrap- ի բոլոր պատկերակները կարող եք ներբեռնել [ here](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip): Անջատեք ֆայլը և պատճենեք բոլոր SVG պատկերային ֆայլերը ` blog/templates/blog/ ` ներսում գտնվող նոր պանակի մեջ, որը կոչվում է ` icons `: Այդ կերպ Դուք կարող եք մուտք գործել ` pencil-fill.svg ` պես պատկերակ ՝ օգտագործելով ֆայլի ուղի `blog/templates/blog/icons/pencil-fill.svg ` Տողը խմբագրելուց հետո ձեր HTML ֆայլը այժմ պետք է ունենա այսպիսի տեսք. diff --git a/it/deploy/README.md b/it/deploy/README.md index 7cd3cbfbcb2..30a0130b509 100644 --- a/it/deploy/README.md +++ b/it/deploy/README.md @@ -171,7 +171,7 @@ Per implementare un'applicazione web su PythonAnywhere devi prendere il codice d {% filename %}PythonAnywhere command-line{% endfilename %} - $ pip3.8 install --user pythonanywhere + $ pip install --user pythonanywhere 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 {% filename %}PythonAnywhere command-line{% endfilename %} - $ pa_autoconfigure_django.py --python=3.8 https://github.com//my-first-blog.git + $ pa_autoconfigure_django.py --python=3.10 https://github.com//my-first-blog.git Guardando l'esecuzione, potrai vedere cosa sta facendo: diff --git a/it/django_forms/README.md b/it/django_forms/README.md index bde835d90ae..86240bbb18a 100644 --- a/it/django_forms/README.md +++ b/it/django_forms/README.md @@ -60,7 +60,7 @@ Prima di aggiungere il link, abbiamo bisogno di alcune icone da usare come pulsa Nota che vogliamo chiamare la nostra nuova view `post_new`. L'[icona SVG](https://icons.getbootstrap.com/icons/file-earmark-plus/) è fornita dal [Bootstrap Icons](https://icons.getbootstrap.com/) e mostrerà un'icona di pagina con il segno 'più'. Utilizziamo una direttiva sui modelli Django chiamata `include`. Questo immetterà il contenuto del file nel modello Django. Il browser web sa come gestire questo tipo di contenuto senza ulteriori elaborazioni. -> Puoi scaricare tutte le icone di Bootstrap [qui](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip). Scompattare il file e copiare tutti i file immagine SVG in una nuova cartella all'interno `blog/templates/blog/` chiamata `icone`. In questo modo è possibile accedere a un'icona come `pencil-fill.svg` utilizzando il percorso del file `blog/templates/blog/icons/pencil-fill.svg` +> Puoi scaricare tutte le icone di Bootstrap [qui](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip). Scompattare il file e copiare tutti i file immagine SVG in una nuova cartella all'interno `blog/templates/blog/` chiamata `icone`. In questo modo è possibile accedere a un'icona come `pencil-fill.svg` utilizzando il percorso del file `blog/templates/blog/icons/pencil-fill.svg` Dopo aver modificato la riga, il file HTML dovrebbe ora assomigliare a questo: diff --git a/ja/deploy/README.md b/ja/deploy/README.md index 52e8c2913ff..9a28af415e4 100644 --- a/ja/deploy/README.md +++ b/ja/deploy/README.md @@ -196,7 +196,7 @@ PythonAnywhereのコードを`ls`を使って見てみることもできます あなたのサイトは現在、インターネット上で動作しているはずです! PythonAnywhereのWebページをクリックしてリンクを取得します。 あなたはあなたが望む誰とでもこれを共有することができます:) -> **注** これは初心者向けのチュートリアルです。このサイトをデプロイする際にはセキュリティの観点からは理想的ではない、いくつかのショートカットをしました。 もしこのプロジェクトを利用すると決めたり、新しいプロジェクトを開始する場合は、あなたのサイトを安全にするいくつかのヒントについて、[Djangoデプロイチェックリスト](https://docs.djangoproject.com/ja/3.2/howto/deployment/checklist/)を注意深く読んでください。 +> **注** これは初心者向けのチュートリアルです。このサイトをデプロイする際にはセキュリティの観点からは理想的ではない、いくつかのショートカットをしました。 もしこのプロジェクトを利用すると決めたり、新しいプロジェクトを開始する場合は、あなたのサイトを安全にするいくつかのヒントについて、[Djangoデプロイチェックリスト](https://docs.djangoproject.com/ja/5.1/howto/deployment/checklist/)を注意深く読んでください。 ## デバッギングのヒント diff --git a/ja/django_admin/README.md b/ja/django_admin/README.md index 9168d8c87c3..5adbefddb49 100644 --- a/ja/django_admin/README.md +++ b/ja/django_admin/README.md @@ -52,6 +52,6 @@ Postsをクリックして移動し、少し試してみましょう。 5つか6 ![Django admin](images/edit_post3.png) -Django adminについてもっと知りたいときは、Djangoのドキュメントを見るとよいでしょう。https://docs.djangoproject.com/ja/3.2/ref/contrib/admin/ +Django adminについてもっと知りたいときは、Djangoのドキュメントを見るとよいでしょう。https://docs.djangoproject.com/ja/5.1/ref/contrib/admin/ ここでそろそろコーヒー(または紅茶)か何か食べるものを摂って自分を元気づけるのにいいタイミングでしょう。最初のDjangoモデルを作ったのだから、少し休みをとっていいところです! diff --git a/ja/django_forms/README.md b/ja/django_forms/README.md index cf0eccea1f9..30c46581768 100644 --- a/ja/django_forms/README.md +++ b/ja/django_forms/README.md @@ -370,7 +370,7 @@ form = PostForm(instance=post) おめでとう!アプリケーションが完成しました。 -Djangoのフォームについてもっと知りたい場合、Djangoのドキュメントを読んでください。https://docs.djangoproject.com/ja/3.2/topics/forms/ +Djangoのフォームについてもっと知りたい場合、Djangoのドキュメントを読んでください。https://docs.djangoproject.com/ja/5.1/topics/forms/ ## セキュリティ diff --git a/ja/django_models/README.md b/ja/django_models/README.md index 58ad99ee0a6..7d7de843398 100644 --- a/ja/django_models/README.md +++ b/ja/django_models/README.md @@ -162,7 +162,7 @@ class Post(models.Model): - `models.DateTimeField` – 日付と時間のフィールド - `models.ForeignKey` – これは他のモデルへのリンク -コードの細かいところまでは説明し出すと時間がかかるので、ここではしませんが、 モデルのフィールドや上記以外の定義のやり方について知りたい方は是非Djangoドキュメントを見てみて下さい。 (https://docs.djangoproject.com/ja/3.2/ref/models/fields/#field-types) +コードの細かいところまでは説明し出すと時間がかかるので、ここではしませんが、 モデルのフィールドや上記以外の定義のやり方について知りたい方は是非Djangoドキュメントを見てみて下さい。 (https://docs.djangoproject.com/ja/5.1/ref/models/fields/#field-types) `def publish(self):` は何かと言うと、 これこそが先程お話ししたブログを公開するメソッドそのものです。 `def` は、これはファンクション(関数)/メソッドという意味です。`publish` はメソッドの名前で、 変えることもできます。 メソッドの名前に使っていいのは、英小文字とアンダースコアで、アンダースコアはスペースの代わりに使います。 (例えば、平均価格を計算するメソッドは `calculate_average_price` っていう名前にします) diff --git a/ja/django_start_project/README.md b/ja/django_start_project/README.md index b8730e82cc9..9efa73643af 100644 --- a/ja/django_start_project/README.md +++ b/ja/django_start_project/README.md @@ -82,7 +82,7 @@ django-admin.py は、必要なディレクトリとファイルを作成する TIME_ZONE = 'Asia/Tokyo' ``` -言語コードは、言語(例えば、英語の場合は`en`、ドイツ語の場合は`de`のように表します)と、国コード(例えば、ドイツの場合は`de`、スイスの場合は`ch`のように表します)からできています。 あなたの母国語が英語でない場合、これを追加すると、Djangoのデフォルトのボタンや通知が設定した言語に変更されます。 ですのでたとえば「Cancel」ボタンがここで定義した言語に翻訳されます。 [Djangoは多くの言語に対応しています。](https://docs.djangoproject.com/ja/3.2/ref/settings/#language-code) +言語コードは、言語(例えば、英語の場合は`en`、ドイツ語の場合は`de`のように表します)と、国コード(例えば、ドイツの場合は`de`、スイスの場合は`ch`のように表します)からできています。 あなたの母国語が英語でない場合、これを追加すると、Djangoのデフォルトのボタンや通知が設定した言語に変更されます。 ですのでたとえば「Cancel」ボタンがここで定義した言語に翻訳されます。 [Djangoは多くの言語に対応しています。](https://docs.djangoproject.com/ja/5.1/ref/settings/#language-code) 別の言語を使用する場合は、次の行を変更して言語コードを変更します。 diff --git a/ja/django_urls/README.md b/ja/django_urls/README.md index 7128c8e9d93..5b91eb35257 100644 --- a/ja/django_urls/README.md +++ b/ja/django_urls/README.md @@ -100,4 +100,4 @@ urlpatterns = [ エラーが表示されていますね。でも心配しないで。これはむしろ、結構便利なものなんですよ:ここでは、**'post_list' という属性(attribute)がない**ことを知らせてくれています。 これは *ビュー* の名前で、Djangoが探して使おうとしましたが、私たちはこれをまだ作っていませんでした。 現時点では、`/admin/` も動作していないと思います。 心配しなくて大丈夫です。ちゃんとできますから。 別のエラーメッセージが表示された場合は、Webサーバーを再起動してみてください。 これを行うには、Webサーバーを実行しているコンソールウィンドウで、Ctrl + C(CtrlキーとCキーを同時に押す)で停止します。 Windowsの場合、Ctrl + Breakかもしれません。 その後、`python manage.py runserver`を実行してWebサーバーを再起動します。 -> Django URLconfについてもっと知りたい場合は、公式のドキュメントを見て下さい。 https://docs.djangoproject.com/ja/3.2/topics/http/urls/ +> Django URLconfについてもっと知りたい場合は、公式のドキュメントを見て下さい。 https://docs.djangoproject.com/ja/5.1/topics/http/urls/ diff --git a/ja/django_views/README.md b/ja/django_views/README.md index 3768ace1e3b..9964ded5667 100644 --- a/ja/django_views/README.md +++ b/ja/django_views/README.md @@ -41,4 +41,4 @@ def post_list(request): サーバーは実行されていることはわかるのですが、正しく表示されないのはなぜでしょう? 心配しないで!ただのエラーページです! コンソールでのエラーメッセージと同じように、これは実際にかなり便利です。 *TemplateDoesNotExist* と書いてありますね。 それでは次の章でテンプレートを作って、エラーを解決しましょう! -> Djangoのビューについてもっと知りたいのなら、公式ドキュメントをぜひ読んでみてください。 https://docs.djangoproject.com/ja/3.2/topics/http/views/ +> Djangoのビューについてもっと知りたいのなら、公式ドキュメントをぜひ読んでみてください。 https://docs.djangoproject.com/ja/5.1/topics/http/views/ diff --git a/ja/dynamic_data_in_templates/README.md b/ja/dynamic_data_in_templates/README.md index 638fb4b7aa0..931797e2031 100644 --- a/ja/dynamic_data_in_templates/README.md +++ b/ja/dynamic_data_in_templates/README.md @@ -78,4 +78,4 @@ def post_list(request): どうでしたか?次は、このクエリセットをテンプレートで表示させるところを、やってみましょう。 -Djangoのクエリセットについて、もっと知りたければこちらも読んでみてくださいね。 https://docs.djangoproject.com/ja/3.2/ref/models/querysets/ +Djangoのクエリセットについて、もっと知りたければこちらも読んでみてくださいね。 https://docs.djangoproject.com/ja/5.1/ref/models/querysets/ diff --git a/ja/whats_next/README.md b/ja/whats_next/README.md index 169d8aec363..3f0244cf496 100644 --- a/ja/whats_next/README.md +++ b/ja/whats_next/README.md @@ -15,7 +15,7 @@ #### Django - このチュートリアルの続きである[Django Girls Tutorial: Extensions](https://tutorial-extensions.djangogirls.org/) -- [Django 公式チュートリアル](https://docs.djangoproject.com/ja/3.2/intro/tutorial01/) +- [Django 公式チュートリアル](https://docs.djangoproject.com/ja/5.1/intro/tutorial01/) - [Getting Started With Django 動画レッスン](http://www.gettingstartedwithdjango.com/) #### HTML, CSS ならびに JavaScript diff --git a/sk/css/README.md b/sk/css/README.md index a264a8e7e4a..6f8d0c76a9a 100644 --- a/sk/css/README.md +++ b/sk/css/README.md @@ -21,7 +21,7 @@ Aby si nainštalovala Bootstrap, otvor svoj súbor `.html` vo svojom editore a p {% filename %}blog/templates/blog/post_list.html{% endfilename %} ```html - + ``` Nepridá to do tvojho projektu žiadne súbory. Iba to ukazuje na súbory, ktoré už existujú na internete. Skúsme to, otvor svoju webstránku a obnov stránku. Už to máme! @@ -116,7 +116,7 @@ Súbor by mal teraz vyzerať asi takto: Django Girls blog - + diff --git a/sk/deploy/pythonanywhere.md b/sk/deploy/pythonanywhere.md index 3cba37a6aa9..ffb93607159 100644 --- a/sk/deploy/pythonanywhere.md +++ b/sk/deploy/pythonanywhere.md @@ -68,7 +68,7 @@ Môžeš tiež ísť do záložky "Files" a pohybovať sa pomocou zabudovaného Tvoja stránka by teraz mala byť online na internete! Preklikaj sa cez stránku "Web" na PythonAnywhere, kým sa dostaneš k odkazu na ňu. Môžeš ho poslať, komu len chceš. :) -> **Poznámka** Toto je začiatočnícky tutoriál a pre nasadenie stránky sme si niektoré veci zjednodušili, čo nie je ideálne z pohľadu bezpečnosti. Ak sa rozhodneš na tomto projekte ďalej stavať, mala by si si prejsť [Django deployment checklist](https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/) pre zopár tipov, ako svoju stránku zabezpečiť. +> **Poznámka** Toto je začiatočnícky tutoriál a pre nasadenie stránky sme si niektoré veci zjednodušili, čo nie je ideálne z pohľadu bezpečnosti. Ak sa rozhodneš na tomto projekte ďalej stavať, mala by si si prejsť [Django deployment checklist](https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/) pre zopár tipov, ako svoju stránku zabezpečiť. ## Debugovacie tipy diff --git a/sk/django_admin/README.md b/sk/django_admin/README.md index dae7a763c35..e2af1c7c994 100644 --- a/sk/django_admin/README.md +++ b/sk/django_admin/README.md @@ -52,6 +52,6 @@ Uisti sa, že aspoň dva alebo tri príspevky (ale nie všetky) majú nastavený ![Django admin](images/edit_post3.png) -Ak chceš vedieť viac o Django admine, pozri si dokumentáciu Djanga: https://docs.djangoproject.com/en/3.2/ref/contrib/admin/ +Ak chceš vedieť viac o Django admine, pozri si dokumentáciu Djanga: https://docs.djangoproject.com/en/5.1/ref/contrib/admin/ Teraz je asi vhodný čas dať si kávu (alebo čaj) alebo niečo pod zub a nabrať trochu energie. Práve si vytvorila svoj prvý Django model - zaslúžiš si trochu oddychu! \ No newline at end of file diff --git a/sk/django_forms/README.md b/sk/django_forms/README.md index 40d3a32c873..4a956b8adf6 100644 --- a/sk/django_forms/README.md +++ b/sk/django_forms/README.md @@ -60,7 +60,7 @@ Prišiel čas otvoriť `blog/templates/blog/base.html` v editore. Teraz môžeme Všimni si, že chceme zavolať náš nový view `post_new`. [SVG ikonku](https://icons.getbootstrap.com/icons/file-earmark-plus/) máme z [Bootstrap Icons](https://icons.getbootstrap.com/) a zobrazí sa ako ikonka stránky s pluskom. Použijeme šablónový príkaz `include`. Týmto dosiahneme, že sa obsah súboru vloží do Django šablóny. Webový prehliadač vie, ako sa s týmto typom obsahu vysporiadať, bez toho, aby bolo treba čokoľvek ďalej spracovávať. -> Všetky Bootstrapové ikonky si môžeš stiahnuť [tu](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip). Súbor rozbaľ a skopíruj všetky obrázkové súbory SVG do nového adresára vo vnútri `blog/templates/blog/` s názvom `icons`. Vďaka tomuto môžeš pristupovať k ikonke ako `pencil-fill.svg` pomocou cesty `blog/templates/blog/icons/pencil-fill.svg` +> Všetky Bootstrapové ikonky si môžeš stiahnuť [tu](https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip). Súbor rozbaľ a skopíruj všetky obrázkové súbory SVG do nového adresára vo vnútri `blog/templates/blog/` s názvom `icons`. Vďaka tomuto môžeš pristupovať k ikonke ako `pencil-fill.svg` pomocou cesty `blog/templates/blog/icons/pencil-fill.svg` Po zmene riadku by tvoj HTML súbor mal vyzerať takto: @@ -72,7 +72,7 @@ Po zmene riadku by tvoj HTML súbor mal vyzerať takto: Django Girls blog - + @@ -392,7 +392,7 @@ Môžeš si vyskúšať zmeniť názov alebo text a uložiť zmeny! Gratulujeme! Tvoja aplikácia je čím ďalej dokonalejšia! -Ak potrebuješ viac informácií o Django formulároch, prečítaj si dokumentáciu: https://docs.djangoproject.com/en/3.2/topics/forms/ +Ak potrebuješ viac informácií o Django formulároch, prečítaj si dokumentáciu: https://docs.djangoproject.com/en/5.1/topics/forms/ ## Bezpečnosť diff --git a/sk/django_models/README.md b/sk/django_models/README.md index fa58b18377e..9866417986b 100644 --- a/sk/django_models/README.md +++ b/sk/django_models/README.md @@ -168,7 +168,7 @@ Teraz zadefinujeme vlastnosti, o ktorých sme hovorili: `title` (titulka), `text - `models.DateTimeField` - toto je dátum a čas. - `models.ForeignKey` - toto je odkaz na iný model. -Nebudeme si tu vysvetľovať každý kúsok kódu, pretože by to zabralo príliš veľa času. Ak chceš vedieť viac o modelových poliach a definovaní ďalších vecí okrem tých, čo sme popísali vyššie, skús sa pozrieť do dokumentácie Djanga (https://docs.djangoproject.com/en/3.2/ref/models/fields/#field-types). +Nebudeme si tu vysvetľovať každý kúsok kódu, pretože by to zabralo príliš veľa času. Ak chceš vedieť viac o modelových poliach a definovaní ďalších vecí okrem tých, čo sme popísali vyššie, skús sa pozrieť do dokumentácie Djanga (https://docs.djangoproject.com/en/5.1/ref/models/fields/#field-types). A čo `def publish(self):`? To je presne tá metóda `publish`, o ktorej sme hovorili predtým. `def` znamená, že ide o funkciu/metódu, a `publish` je jej názov. Názov metódy môžeš zmeniť, ak chceš. Pravidlo pre názvy metód je, že používame malé písmená a podčiarkovníky namiesto medzier. Napríklad metóda, ktorá vypočíta priemernú cenu by sa mohla nazývať `pocitaj_priemernu_cenu`. diff --git a/sk/django_start_project/README.md b/sk/django_start_project/README.md index 98fd3aeaadb..f94a85ce0e2 100644 --- a/sk/django_start_project/README.md +++ b/sk/django_start_project/README.md @@ -83,7 +83,7 @@ V súbore `settings.py` nájdi riadok, ktorý obsahuje `TIME_ZONE`, a uprav ho t TIME_ZONE = 'Europe/Bratislava' ``` -Jazykový kód sa skladá z jazyka, napr. `en` pre angličtinu alebo `sk` pre slovenčinu, a kódu krajiny, napr. `de` pre Nemecko alebo `ch` pre Švajčiarsko. Ak angličtina nie je tvoj materinský jazyk, môžeš pridať nasledovné, ak chceš zmeniť nápisy na tlačidlách a pripomienkach do svojho jazyka. Ak to spravíš, bude napríklad tlačidlo "Cancel" preložené do jazyka, ktorý tu definuješ. [Django má zabudovaných veľa prekladov](https://docs.djangoproject.com/en/3.2/ref/settings/#language-code). +Jazykový kód sa skladá z jazyka, napr. `en` pre angličtinu alebo `sk` pre slovenčinu, a kódu krajiny, napr. `de` pre Nemecko alebo `ch` pre Švajčiarsko. Ak angličtina nie je tvoj materinský jazyk, môžeš pridať nasledovné, ak chceš zmeniť nápisy na tlačidlách a pripomienkach do svojho jazyka. Ak to spravíš, bude napríklad tlačidlo "Cancel" preložené do jazyka, ktorý tu definuješ. [Django má zabudovaných veľa prekladov](https://docs.djangoproject.com/en/5.1/ref/settings/#language-code). Ak chceš iný jazyk, zmeň jazykový kód tým, že zmeníš nasledujúci riadok: diff --git a/sk/django_urls/README.md b/sk/django_urls/README.md index 93bfc909581..0a662c0a45f 100644 --- a/sk/django_urls/README.md +++ b/sk/django_urls/README.md @@ -112,4 +112,4 @@ Ak sa teraz pokúsiš navštiviť http://127.0.0.1:8000/, uvidíš správu, že Konzola zobrazuje chybu, ale neboj sa - je to práveže nápomocné: hovorí ti, že neexistuje atribút post_list (**no attribute 'post_list'**). To je názov *viewu*, ktorý sa Django pokúša nájsť a použiť, ale my sme ho ešte nevytvorili. V tejto fáze `/admin/` tiež nefunguje. Žiadne obavy, aj k tomu sa dostaneme. Ak vidíš inú chybovú hlášku, skúš reštartovať web server. To môžeš docieliť tak, že v príkazovom okne, kde beží tvoj web server, stlačíš Ctrl + C (klávesy Control a C) naraz. Na Windowse možno bude treba stlačiť Ctrl + Break. Svoj web server potom znova spustíš príkazom `python manage.py runserver`. -> Ak chceš vedieť viac o Django URL konfigurácii, pozri sa na oficiálnu dokumentáciu: https://docs.djangoproject.com/en/3.2/topics/http/urls/ \ No newline at end of file +> Ak chceš vedieť viac o Django URL konfigurácii, pozri sa na oficiálnu dokumentáciu: https://docs.djangoproject.com/en/5.1/topics/http/urls/ \ No newline at end of file diff --git a/sk/django_views/README.md b/sk/django_views/README.md index b3c2bc100b6..3f8d8799725 100644 --- a/sk/django_views/README.md +++ b/sk/django_views/README.md @@ -41,4 +41,4 @@ Ulož súbor, prejdi na http://127.0.0.1:8000/ a pozri sa, čo sa udeje. Ukazuje, že server aspoň znovu beží, ale nie je to úplne ono, že? Neboj sa, je to len chybová stránka, nič, čoho sa treba báť! Podobne ako chyby v konzole nám tieto chyby napovedajú, čo treba robiť. Dočítaš sa, že *TemplateDoesNotExist* (šablóna neexistuje). Poďme opraviť túto chybu tým, že vytvoríme šablónu v nasledujúcej kapitole! -> Viac informácií o Django viewoch získaš v oficiálnej dokumentácii: https://docs.djangoproject.com/en/3.2/topics/http/views/ \ No newline at end of file +> Viac informácií o Django viewoch získaš v oficiálnej dokumentácii: https://docs.djangoproject.com/en/5.1/topics/http/views/ \ No newline at end of file diff --git a/sk/dynamic_data_in_templates/README.md b/sk/dynamic_data_in_templates/README.md index 1d5e46f9c1e..c169e8376d1 100644 --- a/sk/dynamic_data_in_templates/README.md +++ b/sk/dynamic_data_in_templates/README.md @@ -81,4 +81,4 @@ def post_list(request): To je všetko! Čas prejsť na našu šablónu a zobraziť tento QuerySet! -Pokiaľ si chceš prečítať niečo viac o QuerySetoch v Djangu, mala by si sa pozrieť sem: https://docs.djangoproject.com/en/3.2/ref/models/querysets/ \ No newline at end of file +Pokiaľ si chceš prečítať niečo viac o QuerySetoch v Djangu, mala by si sa pozrieť sem: https://docs.djangoproject.com/en/5.1/ref/models/querysets/ \ No newline at end of file diff --git a/sk/template_extending/README.md b/sk/template_extending/README.md index c0c7ae5d786..3cd8197fb10 100644 --- a/sk/template_extending/README.md +++ b/sk/template_extending/README.md @@ -27,7 +27,7 @@ Otvor ho v editore a skopíruj všetko z `post_list.html` do `base.html` takto: Django Girls blog - + diff --git a/sk/whats_next/README.md b/sk/whats_next/README.md index 8f6a28cdb54..f3413c3eff9 100644 --- a/sk/whats_next/README.md +++ b/sk/whats_next/README.md @@ -15,7 +15,7 @@ Potom určite začni sledovať Django Girls na [Facebooku](http://facebook.com/d #### Django - Naša knižka [Django Girls Tutorial: Extensions](https://tutorial-extensions.djangogirls.org/) -- [Oficiálny Django návod](https://docs.djangoproject.com/en/3.2/intro/tutorial01/) +- [Oficiálny Django návod](https://docs.djangoproject.com/en/5.1/intro/tutorial01/) - [Video návod Getting Started With Django](http://www.gettingstartedwithdjango.com/) - [Django for Everybody Specialization](https://www.coursera.org/specializations/django) – niektoré z prednášok možno sledovať zdarma a môžeš za ne dostať Coursera certifikát