[Fixed]-Dynamic fields querying in django

1👍

You can unpack any list and pass it to the function this way:

fields_set = ['field1', 'field2', 'filed3']
field_value = model.objects.values_list(*fields_set)

Leave a comment