Skip to content
/ wagtail Public
forked from wagtail/wagtail

Commit

Permalink
Update Django intersphinx references to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
NXPY123 authored and lb- committed Jan 21, 2024
1 parent ecc1194 commit 7fa335c
Show file tree
Hide file tree
Showing 30 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions docs/advanced_topics/add_to_django_project.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to add Wagtail into an existing Django project

To install Wagtail completely from scratch, create a new Django project and an app within that project. For instructions on these tasks, see [Writing your first Django app](django:intro/tutorial01). Your project directory will look like the following:
To install Wagtail completely from scratch, create a new Django project and an app within that project. For instructions on these tasks, see [Writing your first Django app](inv:django#intro/tutorial01). Your project directory will look like the following:

```
myproject/
Expand All @@ -18,7 +18,7 @@ myproject/
manage.py
```

From your app directory, you can safely remove `admin.py` and `views.py`, since Wagtail will provide this functionality for your models. Configuring Django to load Wagtail involves adding modules and variables to `settings.py` and URL configuration to `urls.py`. For a more complete view of what's defined in these files, see [Django Settings](django:topics/settings) and [Django URL Dispatcher](django:topics/http/urls).
From your app directory, you can safely remove `admin.py` and `views.py`, since Wagtail will provide this functionality for your models. Configuring Django to load Wagtail involves adding modules and variables to `settings.py` and URL configuration to `urls.py`. For a more complete view of what's defined in these files, see [Django Settings](inv:django#topics/settings) and [Django URL Dispatcher](inv:django#topics/http/urls).

What follows is a settings reference which skips many boilerplate Django settings. If you just want to get your Wagtail install up quickly without fussing with settings at the moment, see [](complete_example_config).

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_topics/customisation/streamfield_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ As with any model field in Django, any changes to a model definition that affect

To mitigate this, StructBlock, StreamBlock and ChoiceBlock implement additional logic to ensure that any subclasses of these blocks are deconstructed to plain instances of StructBlock, StreamBlock and ChoiceBlock -- in this way, the migrations avoid having any references to your custom class definitions. This is possible because these block types provide a standard pattern for inheritance, and know how to reconstruct the block definition for any subclass that follows that pattern.

If you subclass any other block class, such as `FieldBlock`, you will need to either keep that class definition in place for the lifetime of your project, or implement a [custom deconstruct method](django:custom-deconstruct-method) that expresses your block entirely in terms of classes that are guaranteed to remain in place. Similarly, if you customise a StructBlock, StreamBlock or ChoiceBlock subclass to the point where it can no longer be expressed as an instance of the basic block type -- for example, if you add extra arguments to the constructor -- you will need to provide your own `deconstruct` method.
If you subclass any other block class, such as `FieldBlock`, you will need to either keep that class definition in place for the lifetime of your project, or implement a [custom deconstruct method](inv:django#custom-deconstruct-method) that expresses your block entirely in terms of classes that are guaranteed to remain in place. Similarly, if you customise a StructBlock, StreamBlock or ChoiceBlock subclass to the point where it can no longer be expressed as an instance of the basic block type -- for example, if you add extra arguments to the constructor -- you will need to provide your own `deconstruct` method.
12 changes: 6 additions & 6 deletions docs/advanced_topics/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Once you've built your Wagtail site, it's time to release it upon the rest of the internet.

Wagtail is built on Django, and so the vast majority of the deployment steps and considerations for deploying Django are also true for Wagtail. We recommend reading Django's ["How to deploy Django"](django:howto/deployment/index) documentation.
Wagtail is built on Django, and so the vast majority of the deployment steps and considerations for deploying Django are also true for Wagtail. We recommend reading Django's ["How to deploy Django"](inv:django#howto/deployment/index) documentation.

## Infrastructure Requirements

Expand All @@ -14,12 +14,12 @@ When designing infrastructure for hosting a Wagtail site, there are a few basic

> Django, being a web framework, needs a web server in order to operate. Since most web servers don’t natively speak Python, we need an interface to make that communication happen.
Wagtail can be deployed using either [WSGI](django:howto/deployment/wsgi/index) or [ASGI](django:howto/deployment/asgi/index), however Wagtail doesn't natively implement any async views or middleware, so we recommend WSGI.
Wagtail can be deployed using either [WSGI](inv:django#howto/deployment/wsgi/index) or [ASGI](inv:django#howto/deployment/asgi/index), however Wagtail doesn't natively implement any async views or middleware, so we recommend WSGI.

### Static files

As with all Django projects, static files are only served by the Django application server during development, when running through the `manage.py runserver` command. In production, these need to be handled separately at the web server level.
See [Django's documentation on deploying static files](django:howto/static-files/deployment).
See [Django's documentation on deploying static files](inv:django#howto/static-files/deployment).

The JavaScript and CSS files used by the Wagtail admin frequently change between releases of Wagtail - it's important to avoid serving outdated versions of these files due to browser or server-side caching, as this can cause hard-to-diagnose issues.
We recommend enabling [ManifestStaticFilesStorage](django.contrib.staticfiles.storage.ManifestStaticFilesStorage) in the `STATICFILES_STORAGE` setting - this ensures that different versions of files are assigned distinct URLs.
Expand All @@ -28,7 +28,7 @@ We recommend enabling [ManifestStaticFilesStorage](django.contrib.staticfiles.st

### User Uploaded Files

Wagtail follows [Django's conventions for managing uploaded files](django:topics/files).
Wagtail follows [Django's conventions for managing uploaded files](inv:django#topics/files).
So by default, Wagtail uses Django's built-in `FileSystemStorage` class which stores files on your site's server, in the directory specified by the `MEDIA_ROOT` setting.
Alternatively, Wagtail can be configured to store uploaded images and documents on a cloud storage service such as Amazon S3;
this is done through the [DEFAULT_FILE_STORAGE](https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_FILE_STORAGE)
Expand Down Expand Up @@ -60,7 +60,7 @@ The django-storages Amazon S3 backends (`storages.backends.s3boto.S3BotoStorage`

### Cache

Wagtail is designed to make huge advantage of Django's [cache framework](django:topics/cache) when available to accelerate page loads. The cache is especially useful for the Wagtail admin, which can't take advantage of conventional CDN caching.
Wagtail is designed to make huge advantage of Django's [cache framework](inv:django#topics/cache) when available to accelerate page loads. The cache is especially useful for the Wagtail admin, which can't take advantage of conventional CDN caching.

Wagtail supports any of Django's cache backend, however we recommend against using one tied to the specific process or environment Django is running (eg `FileBasedCache` or `LocMemCache`).

Expand All @@ -70,7 +70,7 @@ Wagtail, and by extension Django, can be deployed in many different ways on many

### Use Django's deployment checklist

Django has a [deployment checklist](django:howto/deployment/checklist) which runs through everything you should have done or should be aware of before deploying a Django application.
Django has a [deployment checklist](inv:django#howto/deployment/checklist) which runs through everything you should have done or should be aware of before deploying a Django application.

### Performance optimisation

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_topics/documents/storing_and_serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Storing and serving

Wagtail follows [Django’s conventions for managing uploaded files](django:topics/files). For configuration of `FileSystemStorage` and more information on handling user uploaded files, see [](user_uploaded_files).
Wagtail follows [Django’s conventions for managing uploaded files](inv:django#topics/files). For configuration of `FileSystemStorage` and more information on handling user uploaded files, see [](user_uploaded_files).

## File storage location

Expand Down
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](django:topics/i18n/translation).
code, etc, refer to the [Django internationalisation docs](inv: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 @@ -135,4 +135,4 @@ Manually updating a page might not result in a change to its cache key, unless t

## Django

Wagtail is built on Django. Many of the [performance tips](django:topics/performance) set out by Django are also applicable to Wagtail.
Wagtail is built on Django. Many of the [performance tips](inv:django#topics/performance) set out by Django are also applicable to Wagtail.
2 changes: 1 addition & 1 deletion docs/advanced_topics/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class MyPageTest(WagtailPageTestCase):

### Using `dumpdata`

Creating [fixtures](django:howto/initial-data) for tests is best done by creating content in a development
Creating [fixtures](inv:django#howto/initial-data) for tests is best done by creating content in a development
environment, and using Django's [dumpdata](https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-dumpdata) command.

Note that by default `dumpdata` will represent `content_type` by the primary key; this may cause consistency issues when adding / removing models, as content types are populated separately from fixtures. To prevent this, use the `--natural-foreign` switch, which represents content types by `["app", "model"]` instead.
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_topics/third_party_tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ the latest Wagtail versions.
- [How To Alternate Blocks in Your Django & Wagtail Templates](https://www.coderedcorp.com/blog/how-to-alternate-blocks-in-your-templates/) (19 February 2021)
- [Build a Blog With Wagtail CMS (second version)](https://www.accordbox.com/blog/build-blog-wagtail-cms-second-version-available/) (13 January 2021)
- [Migrate your Wagtail Website from wagtailtrans to the new wagtail-localize](https://www.cnc.io/en/blog/wagtailtrans-to-wagtail-localize-migration) (10 January 2021)
- [How to Use the Wagtail CMS for Django: An Overview](https://steelkiwi.com/blog/how-to-use-the-wagtail-cms-for-django-an-overview/) (21 December 2020)
- [How to Use the Wagtail CMS for inv:django# An Overview](https://steelkiwi.com/blog/how-to-use-the-wagtail-cms-for-django-an-overview/) (21 December 2020)
- [Wagtail `modeladmin` and a dynamic panels list](https://kuttler.eu/code/wagtail-modeladmin-and-dynamic-panels-list/) (14 December 2020)
- [Install and Deploy Wagtail CMS on pythonanywhere.com](https://www.theinsidetrade.com/blog/install-and-deploy-wagtail-cms-pythonanywherecom/) (14 December 2020)
- [Overriding the admin CSS in Wagtail](https://www.yellowduck.be/posts/overriding-the-admin-css-in-wagtail/) (4 December 2020)
Expand Down
6 changes: 3 additions & 3 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](django:ref/databases).
In order to run these tests, you must install the required modules for PostgreSQL as described in Django's [Databases documentation](inv: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](django: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](inv: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 Expand Up @@ -282,7 +282,7 @@ export DJANGO_SETTINGS_MODULE=wagtail.test.settings_ui
npm run storybook
```

The last command will start Storybook at `http://localhost:6006/`. It will proxy specific requests to Django at `http://localhost:8000` by default. Use the `TEST_ORIGIN` environment variable to use a different port for Django: `TEST_ORIGIN=http://localhost:9000 npm run storybook`.
The last command will start Storybook at `http://localhost:6006/`. It will proxy specific requests to Django at `http://localhost:8000` by default. Use the `TEST_ORIGIN` environment variable to use a different port for inv:django# `TEST_ORIGIN=http://localhost:9000 npm run storybook`.

## Compiling the documentation

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/first_contribution_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ One thing to keep in mind is that "scratching your own itch" can be a great moti

Before you start contributing to Wagtail, it's important to understand what it is and how it works. Wagtail is a content management system (CMS) used for building websites. Unlike other CMSs, it requires some development time to build up the models and supporting code to use as a CMS. Additionally, Wagtail is built on top of another framework called Django, which is a Python web framework. This might be confusing at first, but it provides a powerful way to create custom systems for developers to build with.

To get started, we recommend reading the [the Zen of Wagtail](../getting_started/the_zen_of_wagtail), which provides a good introduction to the project. You might also want to read the [Django overview](django:intro/overview) to understand what Django provides. To get a sense of how Wagtail fits into the CMS landscape, you can search online for articles that compare WordPress to Wagtail or list the top open source CMSs. Finally, reading some of the [Wagtail Guide](https://guide.wagtail.org/) will give you a better understanding of how the CMS works for everyday users.
To get started, we recommend reading the [the Zen of Wagtail](../getting_started/the_zen_of_wagtail), which provides a good introduction to the project. You might also want to read the [Django overview](inv:django#intro/overview) to understand what Django provides. To get a sense of how Wagtail fits into the CMS landscape, you can search online for articles that compare WordPress to Wagtail or list the top open source CMSs. Finally, reading some of the [Wagtail Guide](https://guide.wagtail.org/) will give you a better understanding of how the CMS works for everyday users.

```{note}
Below is a checklist. There are many like these you can copy for yourself as you progress through this guide.
Expand Down Expand Up @@ -319,7 +319,7 @@ It is best to avoid fixing more than one issue in a single pull request, unless

Unless you are updating the documentation or only making visual style changes, your Pull Request should contain tests.

If you are new to writing tests in Django, start by reading the [Django documentation on testing](django:topics/testing/overview). Re-read the [Wagtail documentation notes on testing](testing) and have a look at [existing tests](https://cs.github.com/?scopeName=All+repos&scope=&q=repo%3Awagtail%2Fwagtail+path%3A**%2Ftests%2F**).
If you are new to writing tests in Django, start by reading the [Django documentation on testing](inv:django#topics/testing/overview). Re-read the [Wagtail documentation notes on testing](testing) and have a look at [existing tests](https://cs.github.com/?scopeName=All+repos&scope=&q=repo%3Awagtail%2Fwagtail+path%3A**%2Ftests%2F**).

Note that the JavaScript testing is not as robust as the Python testing, if possible at least attempt to add some basic JS tests to new behaviour.

Expand Down
8 changes: 4 additions & 4 deletions docs/contributing/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For translations and internationalisation of content made with Wagtail see [](in

## Translation workflow

Wagtail is localised (translated) using Django's [translation system](django:topics/i18n/translation) and the translations are provided to and managed by [Transifex](https://www.transifex.com/), a web platform that helps organisations coordinate translation projects.
Wagtail is localised (translated) using Django's [translation system](inv:django#topics/i18n/translation) and the translations are provided to and managed by [Transifex](https://www.transifex.com/), a web platform that helps organisations coordinate translation projects.

Translations from Transifex are only integrated into the repository at the time of a new release. When a release is close to being ready there will be a RC (Release Candidate) for the upcoming version and the translations will be exported to Transifex.

Expand Down Expand Up @@ -38,7 +38,7 @@ These new translations are imported into Wagtail for any subsequent RC and the f

## Marking strings for translation

In code, strings can be marked for translation with using Django's [translation system](django:topics/i18n/translation), using `gettext` or `gettext_lazy` in Python and `blocktranslate`, `translate`, and `_(" ")` in templates.
In code, strings can be marked for translation with using Django's [translation system](inv:django#topics/i18n/translation), using `gettext` or `gettext_lazy` in Python and `blocktranslate`, `translate`, and `_(" ")` in templates.

In both Python and templates, make sure to always use named placeholder. In addition, in Python, only use the printf style formatting. This is to ensure compatibility with Transifex and help translators in their work.

Expand Down Expand Up @@ -104,7 +104,7 @@ This still works fine. `trans` and `blocktrans` were the tags earlier on in Djan

## Additional resources

- [](django:topics/i18n/translation)
- [](inv:django#topics/i18n/translation)
- A screen-share [Wagtail Space US 2020 Lightning Talk](https://www.youtube.com/watch?v=sLI_AuOMUQw&t=17s) that walks through using Transifex step-by-step
- [Core development instructions for syncing Wagtail translations with Transifex](https://github.com/wagtail/wagtail/wiki/Managing-Wagtail-translations)
- [Django docs](django:topics/i18n/translation)
- [Django docs](inv:django#topics/i18n/translation)
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](django:ref/templates/language)
- **HTML** using [Django templates](inv: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
Loading

0 comments on commit 7fa335c

Please sign in to comment.