Add a new column to settings showing if they are overrided via environment variable.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -112,6 +112,9 @@
|
|||||||
- Add support for extended templates when there are no results.
|
- Add support for extended templates when there are no results.
|
||||||
- Add help messages and useful links to several apps when there
|
- Add help messages and useful links to several apps when there
|
||||||
are no results available.
|
are no results available.
|
||||||
|
- Add a new column to settings showing if they are overrided
|
||||||
|
via environment variable.
|
||||||
|
|
||||||
|
|
||||||
3.0.3 (2018-08-17)
|
3.0.3 (2018-08-17)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from common import MayanAppConfig, menu_sidebar, menu_setup, menu_object
|
from common import MayanAppConfig, menu_sidebar, menu_setup, menu_object
|
||||||
|
from common.widgets import TwoStateWidget
|
||||||
from navigation import SourceColumn
|
from navigation import SourceColumn
|
||||||
|
|
||||||
from .classes import Namespace, Setting
|
from .classes import Namespace, Setting
|
||||||
@@ -36,6 +37,13 @@ class SmartSettingsApp(MayanAppConfig):
|
|||||||
SourceColumn(
|
SourceColumn(
|
||||||
source=Setting, label=_('Value'), attribute='serialized_value'
|
source=Setting, label=_('Value'), attribute='serialized_value'
|
||||||
)
|
)
|
||||||
|
SourceColumn(
|
||||||
|
source=Setting, label=_('Environment variable'),
|
||||||
|
func=lambda context: TwoStateWidget(
|
||||||
|
center=True,
|
||||||
|
state=context['object'].environment_variable
|
||||||
|
).render()
|
||||||
|
)
|
||||||
|
|
||||||
menu_object.bind_links(
|
menu_object.bind_links(
|
||||||
links=(link_namespace_detail,), sources=(Namespace,)
|
links=(link_namespace_detail,), sources=(Namespace,)
|
||||||
|
|||||||
Reference in New Issue
Block a user