From d5bd828b8e055edf0065b21368e37ae2174f8c81 Mon Sep 17 00:00:00 2001 From: LB Johnston Date: Mon, 29 May 2023 20:00:14 +1000 Subject: [PATCH] Docs - update Django urls to shorthand method --- docs/advanced_topics/i18n.md | 2 +- docs/advanced_topics/performance.md | 2 +- docs/contributing/developing.md | 4 ++-- docs/contributing/ui_guidelines.md | 2 +- docs/extending/forms.md | 2 +- docs/getting_started/integrating_into_django.md | 2 +- docs/getting_started/tutorial.md | 2 +- docs/releases/3.0.md | 2 +- docs/topics/pages.md | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/advanced_topics/i18n.md b/docs/advanced_topics/i18n.md index d5d7936c1ed6..37072e3a6d76 100644 --- a/docs/advanced_topics/i18n.md +++ b/docs/advanced_topics/i18n.md @@ -27,7 +27,7 @@ There are two options for managing translations across different languages in th This document only covers the internationalisation of content managed by Wagtail. For information on how to translate static content in template files, JavaScript -code, etc, refer to the [Django internationalisation docs](https://docs.djangoproject.com/en/stable/topics/i18n/translation/). +code, etc, refer to the [Django internationalisation docs](django:topics/i18n/translation). Or, if you are building a headless site, refer to the docs of the frontend framework you are using. ### Wagtail's approach to multi-lingual content diff --git a/docs/advanced_topics/performance.md b/docs/advanced_topics/performance.md index 0e35e872deed..7ddfaad1d2f5 100644 --- a/docs/advanced_topics/performance.md +++ b/docs/advanced_topics/performance.md @@ -94,4 +94,4 @@ This optimisation is already handled for you for images in the admin site. ## Django -Wagtail is built on Django. Many of the [performance tips](https://docs.djangoproject.com/en/stable/topics/performance/) set out by Django are also applicable to Wagtail. +Wagtail is built on Django. Many of the [performance tips](django:topics/performance) set out by Django are also applicable to Wagtail. diff --git a/docs/contributing/developing.md b/docs/contributing/developing.md index 40e443b42373..2d94ab361b62 100644 --- a/docs/contributing/developing.md +++ b/docs/contributing/developing.md @@ -118,7 +118,7 @@ django-admin makemigrations --settings=wagtail.test.settings ### Testing against PostgreSQL ```{note} -In order to run these tests, you must install the required modules for PostgreSQL as described in Django's [Databases documentation](https://docs.djangoproject.com/en/stable/ref/databases/). +In order to run these tests, you must install the required modules for PostgreSQL as described in Django's [Databases documentation](django:ref/databases). ``` By default, Wagtail tests against SQLite. You can switch to using PostgreSQL by @@ -133,7 +133,7 @@ If you need to use a different user, password, host, or port, use the `PGUSER`, ### Testing against a different database ```{note} -In order to run these tests, you must install the required client libraries and modules for the given database as described in Django's [Databases documentation](https://docs.djangoproject.com/en/stable/ref/databases/) or the 3rd-party database backend's documentation. +In order to run these tests, you must install the required client libraries and modules for the given database as described in Django's [Databases documentation](django:ref/databases) or the 3rd-party database backend's documentation. ``` If you need to test against a different database, set the `DATABASE_ENGINE` diff --git a/docs/contributing/ui_guidelines.md b/docs/contributing/ui_guidelines.md index ad6d297e8eec..c2d2e75edbfb 100644 --- a/docs/contributing/ui_guidelines.md +++ b/docs/contributing/ui_guidelines.md @@ -2,7 +2,7 @@ Wagtail’s user interface is built with: -- **HTML** using [Django templates](https://docs.djangoproject.com/en/stable/ref/templates/language/) +- **HTML** using [Django templates](django:ref/templates/language) - **CSS** using [Sass](https://sass-lang.com/) and [Tailwind](https://tailwindcss.com/) - **JavaScript** with [TypeScript](https://www.typescriptlang.org/) - **SVG** for our icons, minified with [SVGO](https://jakearchibald.github.io/svgomg/) diff --git a/docs/extending/forms.md b/docs/extending/forms.md index a910ef1a6a54..b0bde312f362 100644 --- a/docs/extending/forms.md +++ b/docs/extending/forms.md @@ -1,6 +1,6 @@ # Using forms in admin views -[Django's forms framework](https://docs.djangoproject.com/en/stable/topics/forms/) can be used within Wagtail admin views just like in any other Django app. However, Wagtail also provides various admin-specific form widgets, such as date/time pickers and choosers for pages, documents, images, and snippets. By constructing forms using `wagtail.admin.forms.models.WagtailAdminModelForm` as the base class instead of `django.forms.models.ModelForm`, the most appropriate widget will be selected for each model field. For example, given the model and form definition: +[Django's forms framework](django:topics/forms) can be used within Wagtail admin views just like in any other Django app. However, Wagtail also provides various admin-specific form widgets, such as date/time pickers and choosers for pages, documents, images, and snippets. By constructing forms using `wagtail.admin.forms.models.WagtailAdminModelForm` as the base class instead of `django.forms.models.ModelForm`, the most appropriate widget will be selected for each model field. For example, given the model and form definition: ```python from django.db import models diff --git a/docs/getting_started/integrating_into_django.md b/docs/getting_started/integrating_into_django.md index 48e01a9bfd2c..b05941e4ead8 100644 --- a/docs/getting_started/integrating_into_django.md +++ b/docs/getting_started/integrating_into_django.md @@ -103,7 +103,7 @@ urlpatterns = [ ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ``` -Note that this only works in development mode (`DEBUG = True`); in production, you will need to configure your web server to serve files from `MEDIA_ROOT`. For further details, see the Django documentation: [Serving files uploaded by a user during development](https://docs.djangoproject.com/en/stable/howto/static-files/#serving-files-uploaded-by-a-user-during-development) and [Deploying static files](https://docs.djangoproject.com/en/stable/howto/static-files/deployment/). +Note that this only works in development mode (`DEBUG = True`); in production, you will need to configure your web server to serve files from `MEDIA_ROOT`. For further details, see the Django documentation: [Serving files uploaded by a user during development](https://docs.djangoproject.com/en/stable/howto/static-files/#serving-files-uploaded-by-a-user-during-development) and [Deploying static files](django:howto/static-files/deployment). With this configuration in place, you are ready to run `python manage.py migrate` to create the database tables used by Wagtail. diff --git a/docs/getting_started/tutorial.md b/docs/getting_started/tutorial.md index 9c02c5fbdf85..54e70e53ab19 100644 --- a/docs/getting_started/tutorial.md +++ b/docs/getting_started/tutorial.md @@ -202,7 +202,7 @@ Edit `home/templates/home/home_page.html` to contain the following: ### Wagtail template tags -In addition to Django's [template tags and filters](https://docs.djangoproject.com/en/stable/ref/templates/builtins/), +In addition to Django's [template tags and filters](django:ref/templates/builtins), Wagtail provides a number of its own [template tags & filters](template_tags_and_filters) which can be loaded by including `{% load wagtailcore_tags %}` at the top of your template file. diff --git a/docs/releases/3.0.md b/docs/releases/3.0.md index 2dd795dfa50c..e708a3f3654a 100644 --- a/docs/releases/3.0.md +++ b/docs/releases/3.0.md @@ -197,7 +197,7 @@ Template paths have also been renamed accordingly - templates previously within Where possible, third-party packages that implement their own field panel types should be updated to allow using a plain `FieldPanel` instead, in line with Wagtail dropping its own special-purpose field panel types such as `StreamFieldPanel` and `ImageChooserPanel`. The steps for doing this will depend on the package's functionality, but in general: - * If the panel sets a custom template, your code should instead define [a `Widget` class](https://docs.djangoproject.com/en/stable/ref/forms/widgets/) that produces your desired HTML rendering. + * If the panel sets a custom template, your code should instead define [a `Widget` class](django:ref/forms/widgets) that produces your desired HTML rendering. * If the panel provides a `widget_overrides` method, your code should instead call [`register_form_field_override`](/extending/forms) so that the desired widget is always selected for the relevant model field type. * If the panel provides a `get_comparison_class` method, your code should instead call `wagtail.admin.compare.register_comparison_class` to register the comparison class against the relevant model field type. diff --git a/docs/topics/pages.md b/docs/topics/pages.md index c64930342bbb..2215ae25945e 100644 --- a/docs/topics/pages.md +++ b/docs/topics/pages.md @@ -2,7 +2,7 @@ Each page type (a.k.a. content type) in Wagtail is represented by a Django model. All page models must inherit from the {class}`wagtail.models.Page` class. -As all page types are Django models, you can use any field type that Django provides. See [Model field reference](https://docs.djangoproject.com/en/stable/ref/models/fields/) for a complete list of field types you can use. Wagtail also provides `wagtail.fields.RichTextField` which provides a WYSIWYG editor for editing rich-text content. +As all page types are Django models, you can use any field type that Django provides. See [Model field reference](django:ref/models/fields) for a complete list of field types you can use. Wagtail also provides `wagtail.fields.RichTextField` which provides a WYSIWYG editor for editing rich-text content. ```{note} If you're not yet familiar with Django models, have a quick look at the following links to get you started: