Question 1. how could I use a variable in this queryset,
def function(request):
qset1 = BigTable.objects.values(
'deb_nr_f__dcountry__wcode_f__code',
'deb_nr_f__dcountry__wcode_f__code_name',
).filter(id_nr_f__ie_code__unomer_f__nomer=iteration_result,
)
I mean something like that
def function(request):
x1 = 'id_nr_f__ie_code__unomer_f__nomer'
qset1 = BigTable.objects.values(
'deb_nr_f__dcountry__wcode_f__code',
'deb_nr_f__dcountry__wcode_f__code_name',
).filter(x1 = iteration_result,
)
Question 2. How can I empty the filter with a varianbe, so the the filter in the query does not filter the records. I mean something like that
def function(request):
x1 = 'id_nr_f__ie_code__unomer_f__nomer'
x2 = True
qset1 = BigTable.objects.values(
'deb_nr_f__dcountry__wcode_f__code',
'deb_nr_f__dcountry__wcode_f__code_name',
).filter(x1 = x2,
)
Thank you.