toolware/utils/query.py
def get_date_less_query(days, date_field):
    """
    Query for if date_field is within number of "days" from now.
    """
    query = None
    days = get_integer(days)
    if days:
        future = get_days_from_now(days)
        query = Q(**{"%s__lte" % date_field: future.isoformat()})
    return query
def get_date_less_query(days, date_field):
    query = None
    days = get_integer(days)
    if days:
        future = get_days_from_now(days)
        query = Q(**{"%s__lte" % date_field: future.isoformat()})
    return query
def get_date_less_query ( days , date_field ) : query = None days = get_integer ( days ) if days : future = get_days_from_now ( days ) query = Q ( * * { "%s__lte" % date_field : future . isoformat ( ) } ) return query
Query for if date_field is within number of "days" from now.
Query for if date_field is within number of days from now .