How to rename items in values() in Django?
From django>=1.8 you can use annotate and F object from django.db.models import F MyModel.objects.annotate(renamed_value=F(‘cryptic_value_name’)).values(‘renamed_value’) Also extra() is going to be deprecated, from the django docs: This is an old API that we aim to deprecate at some point in the future. Use it only if you cannot express your query using other queryset methods. If … Read more