Skip to main content

Wagtail Humanitarian Icons

This Wagtail package brings Ocha Humanitarian Icons to Wagtail Admin.

NOTE: The recent versions of Wagtail supports uploading SVGs directly to the images section of the CMS interface. If you just need to upload SVG images and use them on you frontend, consider using that. This package aims to provide a way to select and use predefined humanitarian icons from OCHA.

Installation

pip install wagtail-humanitarian-icons

Add wagtailhumanitarianicons to your installed apps

 INSTALLED_APPS = [
        ...
        "wagtailhumanitarianicons",
        ...
        ]

Usage

This package uses the Wagtail register_icons hook to register all the Ocha Humanitarian svg icons. For more details on how this works, please look at the Wagtail Docs and the wagtail_hooks.py file of this package

You can find a list of all the icons in the file wagtailhumanitarianicons/icons.json. You can refer any icon by the name, without the .svg extension.

The best way to visually choose an icon is to use the package wagtail-icon-chooser as below:

  • First install the wagtail-icon-chooser package
pip install wagtal-icon-chooser
  • Add to wagtailiconchooser to your installed apps
   INSTALLED_APPS = [
          ...
          "wagtailhumanitarianicons",
          "wagtailiconchooser",
          ...
          ]

Then you can use the widgets provided by wagtal-icon-chooser. Refer the package docs for specific details on how to use the widgets, and how to show selected icons on your frontend templates.

Have a look on the sandbox/home/models.py for a complete example, and sandbox/home/templates for an example on rendering on the frontend.

The code used to prepare the OCHA icons can be found at wagtailhumanitarianicons/utils.py

Metadata

Release files for wagtail-humanitarian-icons 2.0.0

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-humanitarian-icons 2.0.0
File Size Uploaded
wagtail-humanitarian-icons-2.0.0.tar.gz 99.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-humanitarian-icons 2.0.0
File Interpreter ABI Platform
wagtail_humanitarian_icons-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 358.0 kB

Release files / wagtail-humanitarian-icons-2.0.0.tar.gz

Download URL wagtail-humanitarian-icons-2.0.0.tar.gz
Size 99.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ce719fcaa8d1944e47a5b43b22dcf763fc52fee249b6bc8b4cda9d948510737c
BLAKE2b-256 checksum
How to use checksums
02f846c8ec5f0bcae704db2db1571ddaa5f809400c50fd1fc4677542e5b68d8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / wagtail_humanitarian_icons-2.0.0-py3-none-any.whl

Download URL wagtail_humanitarian_icons-2.0.0-py3-none-any.whl
Size 258.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8eaf3691a4df05991bda61b1e58241fe11cc3c43034f5385d0901aa93be77e2c
BLAKE2b-256 checksum
How to use checksums
d0b09933855f2037a3827a0e674057874c91e1f8e4d09173abe4b23ae7b39332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

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