Wagtail is an open source content management system built on Django
 
 
 
 
 
Go to file
Sage Abdullah 55d57be7c5 Initial migration of preview panel to Stimulus PreviewController
Initialise preview panel as a Stimulus PreviewController

Fix TypeScript issues in PreviewController

Use Stimulus targets for preview device size inputs

Use Stimulus target for preview panel new tab button

Use Stimulus target for preview panel loading spinner

Use Stimulus target for preview panel refresh button

Use Stimulus target for preview panel mode select

Use Stimulus target for preview panel iframe

Also rename the id to w-preview-iframe to follow our new conventions for
singleton elements

Rely on Stimulus to replace the iframe target

Because we copy all the attributes from the old iframe to the new one,
this means that the new iframe will also become a target. When we remove
the old iframe, the target is disconnected, and subsequent references to
this.iframeTarget should point to the new one.

Access the preview panel's parent side panel element via this.element.parentElement

Bind preview device size inputs using Stimulus data-action

Extract PreviewController.observePanelSize() method

Extract PreviewController.restoreLastSavedPreferences() method

Use Stimulus value for preview panel url

Use Stimulus value for preview panel pending update state

Move edit form and spinner timeout references into instance variables

Extract PreviewController.finishUpdate() method

Extract PreviewController.reloadIframe() method

Extract PreviewController.clearPreviewData() and setPreviewData() methods

Replace preview panel refresh button target with data-action

Extract openPreviewInNewTab method and use it via data-action

Do not close the preview tab if the data is not valid

Use Stimulus values for preview panel auto update config

Extract PreviewController.initAutoUpdate() method

Extract handlePreviewModeChange method and use it via data-action

Use Stimulus classes for preview panel unavailable and has-errors CSS classes

Use Stimulus class for preview panel selected input size

This removes the reliance of having a predefined set of classes for each
device name, making it easier to add support for custom sizes later.

The outline styles have also been updated to make use of focus-visible
when available.

Use hidden attribute for hiding preview panel spinner

Replace PreviewController isUpdating value with an updatePromise instance variable

Extract PreviewController.hasChanges() method

Extract PreviewController.checkAndUpdatePreview() method

Add default values for PreviewController values

Use ProgressController outlet for preview panel refresh button

This allows the use of the button-longrunning handling for the loading state.

Also, turn the button into an icon-only button as there might not be enough space when the panel is resized to the smallest size

Use cloneNode() instead of manually copying the attributes

Extract PreviewController.replaceIframe() and use it as the iframe's action

Extract PreviewController.sidePanelContainer instance attribute

Extract PreviewController.checksSidePanel instance attribute

Extract PreviewController.updateInterval instance attribute

Clean up PreviewController event listeners on disconnect

Extract preview panel device localStorage key into PreviewController Stimulus value

Extract preview panel's width CSS property names into Stimulus values

Disconnect preview panel ResizeObserver on controller disconnect

Use an instance variable for tracking preview availability
2024-09-19 08:22:54 +10:00
.circleci Force refresh of CircleCI pipenv cache 2024-09-11 20:32:47 +01:00
.github Update MySQL and MariaDB healthcheck commands for GitHub Actions 2024-09-13 11:22:47 +01:00
.tx
client Initial migration of preview panel to Stimulus PreviewController 2024-09-19 08:22:54 +10:00
docs Ensure the side panel's show event is dispatched after any hide events 2024-09-19 08:22:54 +10:00
etc
scripts Update latest.txt for 6.2.1 2024-08-20 16:48:00 +01:00
wagtail Initial migration of preview panel to Stimulus PreviewController 2024-09-19 08:22:54 +10:00
.babelrc.json
.coveragerc
.editorconfig
.eslintignore
.eslintrc.js Changed Button to Link, and removed unnecessary props 2024-02-05 20:07:40 +10:00
.git-blame-ignore-revs
.gitignore Add generated `test-media` to .gitignore 2024-09-12 14:18:34 +01:00
.nvmrc
.pre-commit-config.yaml Speed up semgrep on pre-commit () 2024-05-04 10:40:31 +01:00
.prettierignore
.readthedocs.yml
.semgrep.yml Patch number formatting functions during tests to flag up potential USE_THOUSAND_SEPARATOR issues 2024-08-27 14:15:34 +01:00
.squash.yml
.stylelintignore
.stylelintrc.js
CHANGELOG.txt Ensure the side panel's show event is dispatched after any hide events 2024-09-19 08:22:54 +10:00
CODE_OF_CONDUCT.md
CONTRIBUTORS.md [UI]: Changed class from warning to failure for confirm delete message 2024-09-18 09:48:41 +10:00
LICENSE
MANIFEST.in
Makefile
README.md Release note for / document support for MariaDB 2024-09-12 19:11:22 +01:00
SPONSORS.md Twitter link updated to x () 2024-08-05 13:54:26 +01:00
codecov.yml
conftest.py
package-lock.json Bump serve-static and express 2024-09-12 19:21:35 +01:00
package.json Update NPM packages (minor only) 2024-08-29 18:25:19 +01:00
prettier.config.js
ruff.toml
runtests.py
setup.cfg
setup.py Formalise support for Django 5.1 2024-08-12 11:26:44 +01:00
tailwind.config.js Only scan src in client directory for Tailwind to prevent unnecessary rebuilds 2024-05-17 09:46:28 +01:00
tox.ini Formalise support for Django 5.1 2024-08-12 11:26:44 +01:00
tsconfig.json Add content metrics board () 2024-07-11 14:58:19 +01:00

README.md

Wagtail


Build Status License Version Monthly downloads follow on X

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 4.2.x, 5.0.x and 5.1.x
  • Python 3.9, 3.10, 3.11 and 3.12
  • PostgreSQL, MySQL, MariaDB and SQLite (with JSON1) as database backends

Previous versions of Wagtail additionally supported Python 2.7, 3.8 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.