Skip to main content

Simple feature toggle tool for Leonardo CMS

Project description

==========================
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

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

leonardo-feature-switcher-0.0.2.tar.gz (12.7 kB view details)

Uploaded Source

File details

Details for the file leonardo-feature-switcher-0.0.2.tar.gz.

File metadata

File hashes

Hashes for leonardo-feature-switcher-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a7da4ec658df2674e40854ae581a63e6c0f517e87c79931dc2eee242c1718850
MD5 75bd256b5754a8f0bd5ff983b7183501
BLAKE2b-256 db23a40c426eb2e190e6aff7c4de76248d094ca6d85b5fede4c8dcfee712cf50

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