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 .