1👍
✅
colour = request.POST.get('FormColour') #colour = blue
data_dict = Database.objects.filter(ColourCOL=colour).values('NameCOL', 'AgeCOL', 'NumCOL')
for data in data_dict:
print(data['NameCOL'], data['AgeCOL'], data['NumCOL'])
You can create a dict out of the retrieved data using values, iterate over it and access the column name from dict.
Source:stackexchange.com