diff --git a/htmlmodules.py b/htmlmodules.py index 2d6753f..7266eea 100644 --- a/htmlmodules.py +++ b/htmlmodules.py @@ -568,19 +568,18 @@ def module_paginate(page,pages,perpage,**keys): # THIS FUNCTION USES THE ORIGINAL URI KEYS!!! def module_filterselection(keys,time=True,delimit=False): - filterkeys, timekeys, delimitkeys, extrakeys = uri_to_internal(keys) - internalkeys = {**filterkeys,**timekeys,**delimitkeys,**extrakeys} + from malojatime import today, thisweek, thismonth, thisyear, alltime + filterkeys, timekeys, delimitkeys, extrakeys = uri_to_internal(keys) # drop keys that are not relevant so they don't clutter the URI if not time: timekeys = {} if not delimit: delimitkeys = {} + internalkeys = {**filterkeys,**timekeys,**delimitkeys,**extrakeys} html = "" if time: - # all other keys that will not be changed by clicking another filter - unchangedkeys = internal_to_uri({**filterkeys,**delimitkeys,**extrakeys}) # wonky selector for precise date range @@ -600,21 +599,27 @@ def module_filterselection(keys,time=True,delimit=False): # html += "to " # html += "" - from malojatime import today, thisweek, thismonth, thisyear, alltime - # relative to current range html += "