order_by dynamically

Maybe an easy question, but I can’t find the answer.
Looking at the documentation of order_by (djangoproject.com | order_by), I see order_by(*fields).

What kind of list is the *fields?

I want to use order_by dynamically.

thanks in advance

Keep in mind that in Python:
return_value = some_function('a', 'b', 'c')
is the same as:

my_args = ('a', 'b', 'c')
return_value = some_function(*my_args)

So the list being supplied as fields would be the list (or tuple) of field names - exactly as if you were defining them in the function call itself.

Hello Ken, thank you very much :smiley: