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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wagtail-extras-0.2.7.tar.gz
.
File metadata
- Download URL: wagtail-extras-0.2.7.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a91b05a2a9385ef6a0c35467bc38706c28461885ae929f8607a1bbab742a460 |
|
MD5 | 24f98eacd00edfca3f6a4ef9a8d04263 |
|
BLAKE2b-256 | 2679803b05800b7e07eb1ce00cdb48c3f4438ffae36f3f389c77311f21cb266e |