Commit d7ccb38d authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Hide open but past protocols on index page

This adds the new config key MAX_PAST_INDEX_DAYS
ref #158
parent 0b7f25bb
......@@ -84,6 +84,8 @@ PAGE_DIFF = 3
# upcoming meetings within this number of days from today are shown on the index page
MAX_INDEX_DAYS = 14
MAX_PAST_INDEX_DAYS = 2
MAX_PAST_INDEX_DAYS_BEFORE_REMINDER = 14
# mail to contact in case of complex errors
ADMIN_MAIL = "admin@example.com"
......
......@@ -159,6 +159,7 @@ def index():
protocol for protocol in protocols
if not protocol.done
and (protocol.date - current_day).days < config.MAX_INDEX_DAYS
and (current_day - protocol.date).days < config.MAX_PAST_INDEX_DAYS
],
key=_protocol_sort_key
)
......
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