Я пытался объединить дату и время.Для этого я использовал datetime.combine
.Но это дает AttributeError module 'datetime' has no attribute 'combine'
TimesheetEntry.objects.filter(
timesheet_users = user_id
).order_by(
'-id'
).annotate(
timesheet_clock_in=datetime.combine('timesheet_clock_in_date', 'timesheet_clock_in_time')
).annotate(
timesheet_clock_out=datetime.combine('timesheet_clock_out_date', 'timesheet_clock_out_time')
).values_list(
'timesheet_clock_in',
'timesheet_clock_out',
'timesheet_jobs',
'timesheet_note',
'timesheet_clock_in_by'
)
Я знаю, что ошибка в annotate
, но я не знаю, как ее решить.Запрос работает без annotate