(start_date, end_date)
return where
Get ORM filter kwargs for inclusive event_date range
Get ORM filter kwargs for inclusive event_date range
Get ORM filter kwargs for inclusive event_date range
def get_date_range_where(start_date, end_date):
    """Get ORM filter kwargs for inclusive event_date range"""
    where = {}
    if start_date:
        where["event_date__gt"] = start_date.date()
    if end_date:
        where["event_date__lt"] = end_date.date() + timedelta(days=1)
    return where
def get_date_range_where ( start_date , end_date ) : where = { } if start_date : where [ "event_date__gt" ] = start_date . date ( ) if end_date : where [ "event_date__lt" ] = end_date . date ( ) + timedelta ( days = 1 ) return where