Wagtail is an open source content management system built on Django
 
 
 
 
 
Go to file
Andy Chosak f84cea6715
Don't update the reference index while deleting it
The rebuild_reference_index management command starts by
deleting the entire ReferenceIndex table.

In Wagtail versions 4.1 and 4.2, all models are tracked in the
reference index. Unfortunately this also includes the
ReferenceIndex model itself. This is changed in 5.0 to only track certain Wagtail-related models [0].

This means that when rebuild_reference_index runs in versions
4.1 or 4.2, and deletes the ReferenceIndex table, it runs the code that checks whether ReferenceIndex instances have any
references.

If the index contains a large number of references (as could
happen if an upgrade to 4.1 built an index for a non-Wagtail
model), this process becomes extremely slow. There's no need
for the rebuild_reference_index command to update the index
when deleting it, so this can be significantly optimized by
disabling auto update here.

[0] https://docs.wagtail.org/en/stable/releases/5.0.html#referenceindex-no-longer-tracks-models-used-outside-of-wagtail
2023-07-31 15:38:09 +01:00
.circleci Update black target version to 3.8 in circleci config 2023-07-14 13:44:02 +01:00
.github Install elasticsearch-py v8 for testing against Elasticsearch 8 2023-07-17 16:18:37 +01:00
.tx
client Fix preview panel iframe not loading immediately when preview panel is opened in snippets 2023-07-31 09:53:50 +01:00
docs Don't update the reference index while deleting it 2023-07-31 15:38:09 +01:00
etc
scripts Fetch new translations from Transifex 2023-07-18 15:24:24 +01:00
wagtail Don't update the reference index while deleting it 2023-07-31 15:38:09 +01:00
.coveragerc
.editorconfig
.eslintignore
.eslintrc.js Progress Controller - add backwards compatible cancelSpinner 2023-06-13 12:59:45 +01:00
.git-blame-ignore-revs
.gitignore
.nvmrc
.pre-commit-config.yaml Drop support for Python 3.7 2023-07-14 13:06:41 +01:00
.prettierignore
.readthedocs.yml
.semgrep.yml
.squash.yml
.stylelintignore
.stylelintrc.js
CHANGELOG.txt Don't update the reference index while deleting it 2023-07-31 15:38:09 +01:00
CODE_OF_CONDUCT.md
CONTRIBUTORS.md Add docs for managing stored queries in searchpromotions 2023-07-18 15:00:56 +01:00
LICENSE
MANIFEST.in
Makefile
README.md Drop support for Python 3.7 2023-07-14 13:06:41 +01:00
SPONSORS.md SPONSORS - update http links to https 2023-06-01 16:50:03 +01:00
codecov.yml
conftest.py
package-lock.json Revert "Bump stylelint from 14.3.0 to 15.10.1" 2023-07-13 18:12:20 +10:00
package.json Revert "Bump stylelint from 14.3.0 to 15.10.1" 2023-07-13 18:12:20 +10:00
prettier.config.js
ruff.toml Drop support for Python 3.7 2023-07-14 13:06:41 +01:00
runtests.py Add Elasticsearch 8 to test matrix (but keep using the v7 python library, as a baseline test) 2023-07-17 16:18:37 +01:00
setup.cfg
setup.py Update Sphinx Wagtail Theme to v6.1.1 (#10699) 2023-07-20 07:51:18 +10:00
tailwind.config.js
tox.ini Install elasticsearch-py v8 for testing against Elasticsearch 8 2023-07-17 16:18:37 +01:00
tsconfig.json

README.md

Wagtail Wagtail


Build Status License Version Monthly downloads follow on Twitter

Wagtail is an open source content management system built on Django, with a strong community and commercial support. It's focused on user experience, and offers precise control for designers and developers.

Wagtail screenshot

🔥 Features

  • A fast, attractive interface for authors
  • Complete control over front-end design and structure
  • Scales to millions of pages and thousands of editors
  • Fast out of the box, cache-friendly when you need it
  • Content API for 'headless' sites with decoupled front-end
  • Runs on a Raspberry Pi or a multi-datacenter cloud platform
  • StreamField encourages flexible content without compromising structure
  • Powerful, integrated search, using Elasticsearch or PostgreSQL
  • Excellent support for images and embedded content
  • Multi-site and multi-language ready
  • Embraces and extends Django

Find out more at wagtail.org.

👉 Getting started

Wagtail works with Python 3, on any platform.

To get started with using Wagtail, run the following in a virtual environment:

Installing Wagtail

pip install wagtail
wagtail start mysite
cd mysite
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

For detailed installation and setup docs, see the getting started tutorial.

👨‍👩‍👧‍👦 Whos using it?

Wagtail is used by NASA, Google, Oxfam, the NHS, Mozilla, MIT, the Red Cross, Salesforce, NBC, BMW, and the US and UK governments. Add your own Wagtail site to madewithwagtail.org.

📖 Documentation

docs.wagtail.org is the full reference for Wagtail, and includes guides for developers, designers and editors, alongside release notes and our roadmap.

For those who are new to Wagtail, the Zen of Wagtail will help you understand what Wagtail is, and what Wagtail is not.

For developers who are ready to jump in to their first Wagtail website the Getting Started Tutorial will guide you through creating and editing your first page.

Do you have an existing Django project? The Wagtail Integration documentation is the best place to start.

📌 Compatibility

(If you are reading this on GitHub, the details here may not be indicative of the current released version - please see Compatible Django / Python versions in the Wagtail documentation.)

Wagtail supports:

  • Django 3.2.x, 4.1.x and 4.2.x
  • Python 3.8, 3.9, 3.10 and 3.11
  • PostgreSQL, MySQL and SQLite (with JSON1) as database backends

Previous versions of Wagtail additionally supported Python 2.7, 3.7 and earlier Django versions.


📢 Community Support

There is an active community of Wagtail users and developers responding to questions on Stack Overflow. When posting questions, please read Stack Overflow's advice on how to ask questions and remember to tag your question "wagtail".

For topics and discussions that do not fit Stack Overflow's question and answer format we have a Slack workspace. Please respect the time and effort of volunteers by not asking the same question in multiple places.

Join slack community

Our GitHub discussion boards are open for sharing ideas and plans for the Wagtail project.

We maintain a curated list of third party packages, articles and other resources at Awesome Wagtail.

🧑‍💼 Commercial Support

Wagtail is sponsored by Torchbox. If you need help implementing or hosting Wagtail, please contact us: hello@torchbox.com. See also madewithwagtail.org/developers/ for expert Wagtail developers around the world.

🔐 Security

We take the security of Wagtail, and related packages we maintain, seriously. If you have found a security issue with any of our projects please email us at security@wagtail.org so we can work together to find and patch the issue. We appreciate responsible disclosure with any security related issues, so please contact us first before creating a GitHub issue.

If you want to send an encrypted email (optional), the public key ID for security@wagtail.org is 0xbed227b4daf93ff9, and this public key is available from most commonly-used keyservers.

🕒 Release schedule

Feature releases of Wagtail are released every three months. Selected releases are designated as Long Term Support (LTS) releases, and will receive maintenance updates for an extended period to address any security and data-loss related issues. For dates of past and upcoming releases and support periods, see Release Schedule.

🕛 Nightly releases

To try out the latest features before a release, we also create builds from main every night. You can find instructions on how to install the latest nightly release at https://releases.wagtail.org/nightly/index.html

🙋🏽 Contributing

If you're a Python or Django developer, fork the repo and get stuck in! We have several developer focused channels on the Slack workspace.

You might like to start by reviewing the contributing guidelines and checking issues with the good first issue label.

We also welcome translations for Wagtail's interface. Translation work should be submitted through Transifex.

🔓 License

BSD - Free to use and modify for any purpose, including both open and closed-source code.

👏 Thanks

We thank the following organisations for their services used in Wagtail's development:

Browserstack
BrowserStack provides the project with free access to their live web-based browser testing tool, and automated Selenium cloud testing.

squash.io
Squash provides the project with free test environments for reviewing pull requests.

Assistiv Labs
Assistiv Labs provides the project with unlimited access to their remote testing with assistive technologies.