hack to make a dict without all none implemented feature

This commit is contained in:
Emmanuel Garette 2019-11-29 12:07:18 +01:00
parent 709c0bf228
commit 323d1b83d6
1 changed files with 19 additions and 17 deletions

View File

@ -101,6 +101,7 @@ class Consistencies(object):
self.tiramisu_web = tiramisu_web
def add(self, path, childapi, form):
return
if not childapi.option.isoptiondescription():
for consistency in childapi.option.consistencies():
cons_id, func, all_cons_opts, params = consistency
@ -157,6 +158,7 @@ class Requires(object):
path,
form,
current_action):
return
for requires in childapi.option.requires():
len_to_long = len(requires) > 1
for require in requires:
@ -472,8 +474,8 @@ class TiramisuDict:
self.add_help(schema[path],
childapi)
except Exception as err:
# import traceback
# traceback.print_exc()
import traceback
traceback.print_exc()
if not init:
raise err
error = err
@ -518,12 +520,12 @@ class TiramisuDict:
schema[path]['autoFreeze'] = True
if web_type == 'choice':
values, values_params = childapi.value.callbacks()
if values_params:
for values_param in chain(values_params.args, values_params.kwargs.values()):
if isinstance(values_param, ParamOption):
self.set_remotable(path, form, childapi)
return
#values, values_params = childapi.value.callbacks()
#if values_params:
# for values_param in chain(values_params.args, values_params.kwargs.values()):
# if isinstance(values_param, ParamOption):
# self.set_remotable(path, form, childapi)
# return
schema[path]['enum'] = self.get_enum(childapi,
is_multi,
path,
@ -555,15 +557,15 @@ class TiramisuDict:
if path in form:
obj_form.update(form[path])
if not childapi_option.issymlinkoption():
if childapi_option.validator() != (None, None):
obj_form['remote'] = True
params = childapi_option.validator()[1]
if params is not None:
for param in chain(params.args, params.kwargs.values()):
if isinstance(param, ParamContext):
raise ValueError(_('context is not supported from now for {}').format(path))
if isinstance(param, ParamOption):
self.set_remotable(param.option.impl_getpath(), form)
#if childapi_option.validator() != (None, None):
# obj_form['remote'] = True
# params = childapi_option.validator()[1]
# if params is not None:
# for param in chain(params.args, params.kwargs.values()):
# if isinstance(param, ParamContext):
# raise ValueError(_('context is not supported from now for {}').format(path))
# if isinstance(param, ParamOption):
# self.set_remotable(param.option.impl_getpath(), form)
if self.clearable == 'all':
obj_form['clearable'] = True
if self.clearable != 'none':