I am new to django, I want to get an identifier in which the name field contains "John". Below code snippet works very well, but
In view.py
all_ids=Employee.objects.filter(name__contains = 'John').values('id') return HttpResponse(" All id= %d " %all_ids)
It returns:
All id=[{'id': 1},{'id':2} , so on '...(remaining elements truncated)...']
There is a limit to display 20 items. So, how can I get rid of these restrictions and (the remaining elements are truncated)? Is there a better way to get a field for all values ββin a query without truncating?
John smith
source share