I have an array of columns. Like,
fields = ['first_name', 'last_name', 'email']
# this values can be dynamic
I want the values of those columns from the User model.
I tried this.
User.objects.values(fields)
But it doesn't work. It provides a traceback.
AttributeError: 'list' object has no attribute 'split'
Any solution?