1👍
✅
You can use .values()
to fetch only certain values (example from the docs):
>>> Blog.objects.values('id', 'name')
[{'id': 1, 'name': 'Beatles Blog'}]
In your case:
MyModel.objects.filter(mobile_name='xyz').values('total_mark')
👤sk1p
Source:stackexchange.com