Gargoyle is a platform built on top of Django which allows you to switch functionality of your application on and off
based on conditions.
It was originally created by Disqus, but due to the inactivity we at YPlan have
taken over maintenance on this fork.
Tested with all combinations of:
- Python: 2.7, 3.5
- Django: 1.8, 1.9, 1.10
Install it with pip:
pip install gargoyle-yplan
If you are upgrading from the original to this fork, you will need to run the following first, since the packages clash:
pip uninstall django-modeldict gargoyle
Failing to do this will mean that pip uninstall gargoyle will also erase the files for gargoyle-yplan, and
similarly for our django-modeldict fork.
- Added three built-in condition sets for checking if today is before or after
a date - UTCTodayConditionSet, AppTodayConditionSet, and
- Set requirements to exclude django-jsonfield==1.0.0 which is broken for
PostgreSQL - use 1.0.1+ instead.
- Made gargoyle.register() usable as a decorator
- Made gargoyle.unregister() return the boolean value of whether something
- Fixed removing conditions where the value is the empty string.
- Removed debug prints from conditions.py which spammed your WSGI logs.
- Added a migration to tidy up bytes versus str for choices on
Switch.status. It’s no-op as choices is in-memory only.
- Bugfix for @switches which didn’t work on TestCase classes properly
- Removed the South Migrations, since South doesn’t support Django 1.7+, and
Gargoyle only supports Django 1.8+.
- Added all __future__ imports to all files for Python 2.7/3
- Made @switches usable as a class decorator for unittest.TestCase
classes as well, where it applies from setUpClass through all tests to
tearDownClass. This adds a dependency on contextdecorator on Python
- Simplified autodiscovery code to use AppConfig.ready(). It’s no longer
necessary to add a call to gargoyle.autodiscover() in your urls.py,
when not using Nexus.
- Fixed url patterns warnings that appear on Django 1.9
- Fixed the splitting of Range conditions, a merge of disqus/gargoyle#55,
- Fixed the parsing of Range conditions for the Nexus admin interface.
- Fixed the Nexus interface to work with Switches that contain dots in their
names, a merge of disqus/gargoyle#73, thanks @Raekkeri.
- Added ifnotswitch template tag, a merge of disqus/gargoyle#92, thanks
- Fixed Nexus admin interface for Switches with spaces in their keys, an issue
reported in disqus/gargoyle#98, thanks @arnaudlimbourg.
This version has a broken UI, please upgrade
- Support for Django 1.9
- Use the YPlan fork of django-modeldict
- Removed support for Django 1.7
- Added support for Python 3.4 and 3.5
- Fix requirements to use nexus-yplan not nexus
- Forked by YPlan
- Django 1.8 compatibility - use Django migrations
- Better support for Django 1.6 and Django 1.7
- Dropped support for Django 1.2 and Django 1.3
- Use model_name in favour of module_name if available (deprecation in Django 1.6)
- DateTimeFields now utilize the auto_now=True kwarg
- Travis now tests on Django 1.6/Django 1.7
- Bump ModelDict version to handle expiration in Celery tasks.
- Correct issue with trying to serialize datetime objects.
- Changed the behavior of gargoyle.testutils.switches to monkey patch
the is_active method which should solve scenarios where switches
are reloaded during the context.
- Added confirmation message for enabling switches globally.
- Added date modified and sorts for switches on index view.
- Added basic switch inheritance.
- Added auto collapsing of switch details in interface.
- Added simple search filtering of switches in interface.
- Improved display of Gargoyle dashboard widget.
- Fixed switch_condition_removed signal to pass switch instance.
- Updated signals to pass more useful information in each one (including the switch).
- The percent field is now available on all ModelConditionSet’s by default.
- Fixed a CSRF conflict issue with Nexus.
- Added gargoyle.testutils.with_switches decorator
- Added gargoyle.testutils.SwitchContextManager
- Updated autodiscovery code to resemble Django’s newer example
- Updated django-modeldict to 1.1.6 to solve a threading issue with registration
- Added GARGOYLE_AUTO_CREATE setting to disable auto creation of new switches
- Added the ability to pass arbitrary objects to the ifswitch template tag.
- Ensure HostConditionSet is registered
- Moved tests outside of gargoyle namespace
- [Backwards Incompatible] SELECTIVE switches without conditions are now inactive
- Added ConditionSet.has_active_condition, and support for default NoneType instances
for global / environment checks.
- Added HostConditionSet which allows you to specify a switch for a single