[IMP] web: improve eval context dates

This commit handles 2 things:

1) the merging of the `py_utils.context()` into the evaluation context
returned by `BasicModel._getEvalContext` to access the same time-related
keys,

2) the addition of 2 new keys into the `py_utils.context` (thus
transmitted to the basic model): `today` (an alias for the already
present `current_date`) and `now` which represents the current date and
time value.

Task 2269697
This commit is contained in:
Julien Mougenot
2020-07-14 09:10:32 +00:00
parent b9ad60d5eb
commit 669c2ebaec
5 changed files with 155 additions and 20 deletions
+2
View File
@@ -36,6 +36,8 @@ def _get_attrs_symbols():
'datetime',
'relativedelta',
'current_date',
'today',
'now',
'abs',
'len',
'bool',