include => included fixes #2

This commit is contained in:
2021-02-21 16:58:56 +01:00
parent b094e5a6ca
commit c149d7c38d
82 changed files with 106 additions and 106 deletions

View File

@ -67,7 +67,7 @@
<!ATTLIST file filelist CDATA #IMPLIED>
<!ATTLIST file redefine (True|False) "False">
<!ATTLIST file engine (none|creole|jinja2) #IMPLIED>
<!ATTLIST file include (no|name|content) "no">
<!ATTLIST file included (no|name|content) "no">
<!ELEMENT override EMPTY>
<!ATTLIST override source CDATA #IMPLIED>

View File

@ -286,18 +286,18 @@ class RougailBaseTemplate:
)
for template in listdir('.'):
self.prepare_template(template)
for include in (True, False):
for included in (True, False):
for service_obj in await self.config.option('services').list('all'):
service_name = await service_obj.option.name()
for fills in await service_obj.list('all'):
type_ = await fills.option.name()
for fill_obj in await fills.list('all'):
fill = await fill_obj.value.dict()
if 'include' in fill:
if (fill['include'] == 'no' and include is True) or \
(fill['include'] != 'no' and include is False):
if 'included' in fill:
if (fill['included'] == 'no' and included is True) or \
(fill['included'] != 'no' and included is False):
continue
elif include is True:
elif included is True:
continue
if fill['activate']:
self.instance_file(fill, type_, service_name)

View File

@ -47,7 +47,7 @@ z %%filename - - - - -
%for %%service in %%services
%if %%hasattr(%%service, 'files')
%for %%file in %%service.files
%if %%file.activate == True and %%file.include != 'content'
%if %%file.activate == True and %%file.included != 'content'
%if %%isinstance(%%file.name, list)
%for %%filename in %%file.name
%%display(%%file, %%filename)%slurp