Honor configured db key sequence; let config hide some db keys from UI
This commit is contained in:
parent
3dd70926b9
commit
acda689b15
|
@ -2417,12 +2417,12 @@ class MasterView(View):
|
||||||
supported database engines for the master view. Used with the DB
|
supported database engines for the master view. Used with the DB
|
||||||
picker feature.
|
picker feature.
|
||||||
"""
|
"""
|
||||||
engines = OrderedDict()
|
engines = OrderedDict(self.rattail_config.trainwreck_engines)
|
||||||
if self.rattail_config.rattail_engine:
|
hidden = self.rattail_config.getlist('tailbone', 'engines.rattail.hidden',
|
||||||
engines['default'] = self.rattail_config.rattail_engine
|
default=None)
|
||||||
for dbkey in sorted(self.rattail_config.rattail_engines):
|
if hidden:
|
||||||
if dbkey != 'default':
|
for key in hidden:
|
||||||
engines[dbkey] = self.rattail_config.rattail_engines[dbkey]
|
engines.pop(key, None)
|
||||||
return engines
|
return engines
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|
|
@ -131,12 +131,12 @@ class TransactionView(MasterView):
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_db_engines(self):
|
def get_db_engines(self):
|
||||||
engines = OrderedDict()
|
engines = OrderedDict(self.rattail_config.trainwreck_engines)
|
||||||
if self.rattail_config.trainwreck_engine:
|
hidden = self.rattail_config.getlist('tailbone', 'engines.trainwreck.hidden',
|
||||||
engines['default'] = self.rattail_config.trainwreck_engine
|
default=None)
|
||||||
for dbkey in sorted(self.rattail_config.trainwreck_engines):
|
if hidden:
|
||||||
if dbkey != 'default':
|
for key in hidden:
|
||||||
engines[dbkey] = self.rattail_config.trainwreck_engines[dbkey]
|
engines.pop(key, None)
|
||||||
return engines
|
return engines
|
||||||
|
|
||||||
def configure_grid(self, g):
|
def configure_grid(self, g):
|
||||||
|
|
Loading…
Reference in a new issue