Indexing: Update the default index

Update the default date-based index for the new Jinja2
template language.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-11-30 04:30:38 -04:00
parent abfc8b0c09
commit ab045c499c

View File

@@ -24,11 +24,11 @@ def create_default_document_index(sender, **kwargs):
root_template_node = index.template_root
node = root_template_node.get_children().create(
expression='{{ document.date_added|date:"Y" }}', index=index,
expression='{{ document.date_added.year }}', index=index,
parent=root_template_node
)
node.get_children().create(
expression='{{ document.date_added|date:"m" }}',
expression='{{ document.date_added.month }}',
index=index, link_documents=True, parent=node
)