Hi, I’m trying to use the additional_timeline_content hook in a custom app.
https://frappeframework.com/docs/v14/user/en/python-api/hooks#form-timeline
additional_timeline_content: {
# show in each document's timeline
"*": ["app.timeline.all_timeline"]
# only show in ToDo's timeline
"ToDo": ["app.timeline.todo_timeline"]
}
def todo_timeline(doctype, docname):
# this method should return a list of dicts
return [
{
# this will be used to sort the content in the timeline
"creation": "22-05-2020 18:00:00",
# this JS template will be rendered in the timeline
"template": "custom_timeline_template",
# this data will be passed to the template.
"template_data": {"key": "value"},
},
...
]
-
I enabled the timeline hook and pointed it to a timeline.py file in my app
-
In timeline.py, I included the function all_timeline(doctype, docname) which has a JS template “custom_timeline_template”, according to the Frappe documentation
-
Questions is, where do I put the file custom_timeline_template.js in my app?
Frappe throws a template not found error when I put it in:
/public/js, or
/public, or
/templates, or
/templates/pages, or
next to timeline.py
Thanks in advance!