def do_action(self, queryset): context = self.get_context() self.message_user("选择要计算考勤的日期") ShareContext(context=context, path=self.request.path, query_list=queryset, form=DateSelectForm, title='考勤计算', templates='Attendance/selected.html', callback=attendance_cal, argument_dict={one: "" for one in DateSelectForm.base_fields}) return redirect(form_select)
def do_action(self, queryset): context = self.get_context() self.message_user("选择计算的开始日期和结束日期,以及班次(确保已完成法定节假日处理)") print(self.request.path) ShareContext(context=context, path=self.request.path, query_list=queryset, form=ShiftsInfoDateForm, title='考勤计算', templates='Attendance/selected.html', callback=cal_scheduling_info, argument_dict={one: "" for one in ShiftsInfoDateForm.base_fields}) return redirect(form_select)