Allow use of relative_time as a filter (#60923)

pull/60931/head
Franck Nijhof 2021-12-03 19:30:12 +01:00 committed by GitHub
parent 02b5449648
commit 74d1c340d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1858,6 +1858,7 @@ class TemplateEnvironment(ImmutableSandboxedEnvironment):
self.filters["is_number"] = is_number self.filters["is_number"] = is_number
self.filters["float"] = forgiving_float_filter self.filters["float"] = forgiving_float_filter
self.filters["int"] = forgiving_int_filter self.filters["int"] = forgiving_int_filter
self.filters["relative_time"] = relative_time
self.globals["log"] = logarithm self.globals["log"] = logarithm
self.globals["sin"] = sine self.globals["sin"] = sine
self.globals["cos"] = cosine self.globals["cos"] = cosine