باید به کوئری به چشم یک شی نگاه کنی یک چیزی مثل این باید کارت رو راه بندازه:
result_test = Reception.objects.all()
if From_Date_Response != '' and Until_Date_Response != '':
result_test = result_test.filter(answering_date__range = (From_Date_Response , Until_Date_Response ))
if From_Date_Reception != '' and Until_Date_Reception != '' :
if str_1 != '' :
result_test = result_test.filter(date_acceptance__range = (From_Date_Reception , Until_Date_Reception))
else :
result_test = result_test.filter(date_acceptance__range = (From_Date_Reception , Until_Date_Reception))
if From_Number_Reception != '' and Until_Number_Reception != '' :
if str_1 != '' :
result_test = result_test.filter(id_reception__range = (int(From_Number_Reception) , int (Until_Number_Reception)))
else :
result_test = result_test.filter(id_reception__range = (int(From_Number_Reception) , int (Until_Number_Reception)))