disqus / gargoyle

Feature switches in Django
http://engineering.disqus.com
Apache License 2.0
746 stars 112 forks source link

Added GARGOYLE_SWITCH_DEFAULTS setting, which allows engineers to set the #11

Closed mscheibe closed 13 years ago

mscheibe commented 13 years ago

Added GARGOYLE_SWITCH_DEFAULTS setting, which allows engineers to set the default state of a feature before it's been added via the gargoyle admin. Requires SwitchManager to use auto_create.

It works kind of like this:

GARGOYLE_SWITCH_DEFAULTS = { 'active_by_default': { 'is_active': True, 'label': 'Default Active', 'description': 'When you want the newness', }, 'inactive_by_default': { 'is_active': False, 'label': 'Default Inactive', 'description': 'Controls the funkiness.', }, }

dcramer commented 13 years ago

Great idea! :)

mscheibe commented 13 years ago

thanks! i've got a couple of more pull requests coming :)