2👍
✅
receivers=User.objects.values_list('username', flat=True)
Try this code, you can read more about this in django offical documents
1👍
receivers = User.objects.all().values_list('username')
It will return list of all usernames.
- [Django]-Django: Using DataTables
- [Django]-Django get() takes exactly 2 arguments (3 given)
- [Django]-Using geoip2 for timezone look up
- [Django]-Django OAuth2 Error: invalid_client and client_id=None when client_id has been provided
Source:stackexchange.com