django/views/generic/dates.py
def _date_lookup_for_field(field, date):
    """
    Get the lookup kwargs for looking up a date against a given Field. If the
    date field is a DateTimeField, we can't just do filter(df=date) because
    that doesn't take the time into account. So we need to make a range lookup
    in those cases.
    """
    if isinstance(field, models.DateTimeField):
        date_range = (
            datetime.datetime.combine(date, datetime.time.min),
            datetime.datetime.combine(date, datetime.time.max)
        )
        return {'%s__range' % field.name: date_range}
    else:
        return {field.name: date}

    Get the lookup kwargs for looking up a date against a given Field. If the
    date field is a DateTimeField, we can't just do filter(df=date) because
    that doesn't take the time into account. So we need to make a range lookup
    in those cases.
    
Get the lookup kwargs for looking up a date against a given Field. If the
date field is a DateTimeField, we can't just do filter(df=date) because
that doesn't take the time into account. So we need to make a range lookup
in those cases.
Get the lookup kwargs for looking up a date against a given Field . If the date field is a DateTimeField we can ' t just do filter ( df = date ) because that doesn ' t take the time into account . So we need to make a range lookup in those cases .
def _date_lookup_for_field(field, date):
    if isinstance(field, models.DateTimeField):
        date_range = (
            datetime.datetime.combine(date, datetime.time.min),
            datetime.datetime.combine(date, datetime.time.max)
        )
        return {'%s__range' % field.name: date_range}
    else:
        return {field.name: date}
def _date_lookup_for_field ( field , date ) : if isinstance ( field , models . DateTimeField ) : date_range = ( datetime . datetime . combine ( date , datetime . time . min ) , datetime . datetime . combine ( date , datetime . time . max ) ) return { '%s__range' % field . name : date_range } else : return { field . name : date }
Get the lookup kwargs for looking up a date against a given Field.
Get the lookup kwargs for looking up a date against a given Field .
"""
    Get the lookup kwargs for looking up a date against a given Field. If the
    date field is a DateTimeField, we can't just do filter(df=date) because
    that doesn't take the time into account. So we need to make a range lookup
    in those cases.
    """
field
date