Skip to content

Commit

Permalink
Docs - update Django urls to shorthand method
Browse files Browse the repository at this point in the history
  • Loading branch information
lb- authored and gasman committed Jun 1, 2023
1 parent c5f238f commit d5bd828
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/advanced_topics/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_topics/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions docs/contributing/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/ui_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
2 changes: 1 addition & 1 deletion docs/extending/forms.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/integrating_into_django.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/releases/3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/topics/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d5bd828

Please sign in to comment.