Skip to main content

wagtail_panels

A collection of useful panels to be used for your Wagtail snippets.

Features:

  • Buttons
    • Download a file by providing the attribute name
    • Any callback which takes an instance ID and a request to return a URL.
    • Any URL.
  • Reading time panel

Quick start

  1. Add 'wagtail_panels' to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
    ...,
    'wagtail_panels',
    ]
    

Example of buttons

from wagtail_panels.panels import DownloadButton, AnchorTag, ButtonPanel

...

class MySnippet(models.Model):
      file = models.FileField(upload_to="files")

      panels = [
         ButtonPanel([
             DownloadButton(
                 _("Download File"),
                 "file",
                 classname="button",
             ),
             AnchorTag(
                 _("Recover"),
                 lambda request, instance: \
                     reverse_lazy("my_view", kwargs={"pk": instance.pk}),
                 classname="button no",
                 HIDE_ON_CREATE=True,
             )
         ]),
      ]

Example of reading time panel

from wagtail_panels.models import (
    PageReadingTimeMixin,
)
from wagtail_panels.panels import (
    ReadingTimePanel,
)


class MyPage(PageReadingTimeMixin, Page):
    content_panels = Page.content_panels + [
        ReadingTimePanel(),
    ]

Metadata

Release files for wagtail-panels 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-panels 1.0.1
File Size Uploaded Provenance Actions
wagtail_panels-1.0.1.tar.gz 19.7 kB Without provenance Details for wagtail_panels-1.0.1.tar.gz

Release files / wagtail_panels-1.0.1.tar.gz

Download URL wagtail_panels-1.0.1.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5a58d8e3fe4ac3cb8b91623f2211698cc155b44870f532792aa77c6aecbde4fa
BLAKE2b-256 checksum
How to use checksums
d35fef821eac001bdbaf4f986ff8ecdd0f4d782249d8a9ddb7875614ad5b898d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Security for wagtail-panels 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page