How can one write an alias for the column name in django query set. Would be useful for union-style combinations of two linked field to the same foreign model (for instance).
You can annotate the fields as you want, with the F expression:
from django.db.models import F models.Table.objects.all().values('m', 'b').annotate(n=F('m'), a=F('b'))