add rougail_index
This commit is contained in:
@ -97,6 +97,7 @@ def process(filename: str,
|
||||
destfilename: str,
|
||||
destdir: str,
|
||||
variable: Any,
|
||||
index: int,
|
||||
rougail_variables_dict: Dict,
|
||||
eosfunc: Dict,
|
||||
):
|
||||
@ -110,6 +111,8 @@ def process(filename: str,
|
||||
}
|
||||
if variable is not None:
|
||||
extra_context['rougail_variable'] = variable
|
||||
if index is not None:
|
||||
extra_context['rougail_index'] = index
|
||||
cheetah_template = CheetahTemplate(filename,
|
||||
source,
|
||||
rougail_variables_dict,
|
||||
|
@ -119,6 +119,7 @@ def process(filename: str,
|
||||
destfilename: str,
|
||||
destdir: str,
|
||||
variable: Any,
|
||||
index: int,
|
||||
rougail_variables_dict: Dict,
|
||||
eosfunc: Dict,
|
||||
):
|
||||
@ -132,6 +133,8 @@ def process(filename: str,
|
||||
}
|
||||
if variable is not None:
|
||||
extra_context['rougail_variable'] = variable
|
||||
if index is not None:
|
||||
extra_context['rougail_index'] = index
|
||||
cheetah_template = CheetahTemplate(filename,
|
||||
source,
|
||||
rougail_variables_dict,
|
||||
|
@ -39,6 +39,7 @@ def process(filename: str,
|
||||
destfilename: str,
|
||||
destdir: str,
|
||||
variable: Any,
|
||||
index: int,
|
||||
rougail_variables_dict: Dict,
|
||||
eosfunc: Dict,
|
||||
):
|
||||
@ -48,11 +49,11 @@ def process(filename: str,
|
||||
dir_name, template_name = filename.rsplit('/', 1)
|
||||
if source is not None: # pragma: no cover
|
||||
raise TemplateError(_('source is not supported for jinja2'))
|
||||
rougail_variables_dict['rougail_variable'] = variable
|
||||
var = {}
|
||||
if variable is not None:
|
||||
var = {'rougail_variable': variable}
|
||||
else:
|
||||
var = {}
|
||||
var['rougail_variable'] = variable
|
||||
if index is not None:
|
||||
var['rougail_index'] = index
|
||||
try:
|
||||
# extra_context = {'normalize_family': normalize_family,
|
||||
# eosfunc
|
||||
|
Reference in New Issue
Block a user