I have query set that I am exporting to CSV.
models.One2OneInfoLog.objects.filter(one_2_one_info=pk).values_list('name', 'location', 'created').order_by('created')
I want the 'name' field to be in lowercase. Is their a way to do that?
You can use the Database Function 'Lower' to convert to lowercase:
from django.db.models.functions import Lower
models.One2OneInfoLog.objects.filter(one_2_one_info=pk).values_list(Lower('name'), 'location', 'created').order_by('created')
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments