Here is my case:
I have different types of users to share one general view, but I want return different fields for them. I used values() to specific fields, like this values('f1', 'f2'), and it returned the queryset.
Then, I wanted to use a variable to store the fields to query, and pass it in the values(), but failed. My snippets look like this:
list = ('f1', 'f2')
e = Entity.objects.all().values(list)
I tried tuple, list, str, but all failed.
Error msg:
object has no attribute 'split'
What is the correct way to get this function?