Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

added some more fields for document file naming.

Jonas Winkler9956b7ff1b4a
diff --git a/src/documents/file_handling.py b/src/documents/file_handling.py
index 22d5a052d..68180448c 100644
--- a/src/documents/file_handling.py
+++ b/src/documents/file_handling.py
@@ -73,7 +73,13 @@ def generate_filename(document):
correspondent=slugify(document.correspondent),
title=slugify(document.title),
created=slugify(document.created),
+ created_year=document.created.year if document.created else "none",
+ created_month=document.created.month if document.created else "none",
+ created_day=document.created.day if document.created else "none",
added=slugify(document.added),
+ added_year=document.added.year if document.added else "none",
+ added_month=document.added.month if document.added else "none",
+ added_day=document.added.day if document.added else "none",
tags=tags,
)
else: