Skip to main content
==========================
Leonardo leonardo-feature-switcher
==========================

Simple feature toggle tool for Leonardo CMS

.. contents::
:local:

Installation
------------

.. code-block:: bash

pip install leonardo-feature-switcher

add *feature_switchers* to LEONARDO_CONF_SPEC in your local_settings.py::

LEONARDO_CONF_SPEC = {
'feature_switchers': {},
}

then in your modules add custom switchers::

LEONARDO_FEATURE_SWITCHERS = {
'my_feature': lambda request, *args, **kw: True,
'my_feature1': 'leonardo_feature_switcher.my_feature1'
}

and in your templates::

{% load feature_switcher %}

{% is_on "my_feature" %}

{% if my_feature %}

{% endif %}

{% is_on_as "my_feature" as my_feature_result %}

{% if my_feature_result %}
{% endif %}

Read More
=========

* https://github.com/django-leonardo/django-leonardo

Metadata

Release files for leonardo-feature-switcher 0.0.2

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

Source distribution (sdist)

Source distribution for leonardo-feature-switcher 0.0.2
File Size Uploaded
leonardo-feature-switcher-0.0.2.tar.gz 12.7 kB Details

Release files / leonardo-feature-switcher-0.0.2.tar.gz

Download URL leonardo-feature-switcher-0.0.2.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a7da4ec658df2674e40854ae581a63e6c0f517e87c79931dc2eee242c1718850
BLAKE2b-256 checksum
How to use checksums
db23a40c426eb2e190e6aff7c4de76248d094ca6d85b5fede4c8dcfee712cf50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

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