Commit 1ce038fe authored by Jérome Perrin's avatar Jérome Perrin

hal_json_style: implement default_to_now on date time fields

refs !73  72db2000
parent 4a504e6d
......@@ -239,6 +239,8 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t
"hidden_day_is_last_day": field.get_value(\'hidden_day_is_last_day\'),\n
}\n
date_value = getFieldDefault(traversed_document, field, result["key"], value)\n
if not date_value and field.get_value(\'default_now\'):\n
date_value = DateTime()\n
if same_type(date_value, DateTime()):\n
# Serialize DateTime\n
date_value = date_value.rfc822()\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment