Skip to main content

A collection of tools one might use to make wagtail even better

Project description

Extras for wagtail

This app will add some necessities to wagtail:

Install

pip install wagtail-extras

Add wagtailextras to your installed apps:

INSTALLED_APPS = [
    ...
    'wagtailextras',
    ...
]

For setup of individual parts, please continue below.

ObfuscateEmailAddressMiddleware

Transforms emailaddresses to decimal/hexadecimal unicode character entities to foil bots trying to harvest emailaddress

Setup

Add the following to the middleware:

MIDDLEWARE = [
    ...
    'wagtailextras.middleware.ObfuscateEmailAddressMiddleware',
    ...
]

ForceCsrfCookieMiddleware

Forces Django to create an CSRF token for you when you for example are using JavaScript forms.

Setup

Add the following to the middleware:

MIDDLEWARE = [
    ...
    'wagtailextras.middleware.ForceCsrfCookieMiddleware',
    ...
]

Breadcrumbs

Returns an ordered list in the template, showing the current location.

Usage

Load the template tag:

{% load wagtailextras_tags %}

Write out the breadcrumbs in the html:

{% breadcrumbs %}

Main menu

A simple implementation showing the pagestructure of wagtail as a menu.

Usage

Load the template tag:

{% load wagtailextras_tags %}

Write out the menu in the html:

{% get_site_root as site_root %}
{% main_menu parent=site_root calling_page=self %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-extras-0.2.6.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file wagtail-extras-0.2.6.tar.gz.

File metadata

  • Download URL: wagtail-extras-0.2.6.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for wagtail-extras-0.2.6.tar.gz
Algorithm Hash digest
SHA256 be0be612134e8c4f15e50fb336562e47b4bc2d84f7ee769c9a43a125fd2f8d1c
MD5 dfea7c1bb419d403bb6b871a029f36fd
BLAKE2b-256 466af5109ca58bf646d5ea76f507b5ff5c31afcda35e5fe5ac3d145aa0c112d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page