79626491

Date: 2025-05-17 11:49:01
Score: 0.5
Natty:
Report link

I know this was a while back but I think I've figured out the best solution to this question that doesn't involve actually evaluating the query (which can be expensive) like the OP suggested.

qs = MyModel.objects .... rest of query
field_names = list(qs.query.values_select) + list(qs.query.annotation_select)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jordan Hyatt