tiramisu-web adaptation

This commit is contained in:
2018-01-26 07:33:47 +01:00
parent 050c3125fa
commit 821f36ea65
48 changed files with 76 additions and 70 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"sets the options of the configuration objects Config object itself"
# Copyright (C) 2012-2017 Team tiramisu (see AUTHORS for all contributors)
# Copyright (C) 2012-2018 Team tiramisu (see AUTHORS for all contributors)
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
@ -337,7 +337,8 @@ class Settings(object):
def getproperties(self,
path,
index,
config_bag):
config_bag,
apply_requires=True):
"""
"""
opt = config_bag.option
@ -346,7 +347,7 @@ class Settings(object):
path = opt.impl_getpath(self._getcontext())
is_cached = False
if config_bag.setting_properties is not None:
if apply_requires and config_bag.setting_properties is not None:
if 'cache' in config_bag.setting_properties and \
'expire' in config_bag.setting_properties:
ntime = int(time())
@ -365,14 +366,16 @@ class Settings(object):
else:
props = meta.cfgimpl_get_settings().getproperties(path,
index,
config_bag)
props |= self.apply_requires(path,
index,
False,
config_bag)
config_bag,
apply_requires)
if apply_requires:
props |= self.apply_requires(path,
index,
False,
config_bag)
props -= self.getpermissive(opt,
path)
if config_bag.setting_properties is not None and \
if apply_requires and config_bag.setting_properties is not None and \
'cache' in config_bag.setting_properties:
if 'expire' in config_bag.setting_properties:
ntime = ntime + expires_time