(slug, date_span)
return {
        slug: "{}+to+{}".format(startdate, enddate),
        slug + '-start': startdate,
        slug + '-end': enddate,
    }
Mimics date filter request parameters
Mimics date filter request parameters
Mimics date filter request parameters
def get_date_params(slug, date_span):
    """
    Mimics date filter request parameters
    """
    startdate = date_span.startdate.strftime('%Y-%m-%d')
    enddate = date_span.enddate.strftime('%Y-%m-%d')
    return {
        slug: "{}+to+{}".format(startdate, enddate),
        slug + '-start': startdate,
        slug + '-end': enddate,
    }
def get_date_params ( slug , date_span ) : startdate = date_span . startdate . strftime ( '%Y-%m-%d' ) enddate = date_span . enddate . strftime ( '%Y-%m-%d' ) return { slug : "{}+to+{}" . format ( startdate , enddate ) , slug + '-start' : startdate , slug + '-end' : enddate , }