Created
July 9, 2019 11:12
-
-
Save akshar-raaj/9645de6ffe2eb221725bc4e4eaffc2e1 to your computer and use it in GitHub Desktop.
DRF Longer .values()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_users(request): | |
| users = list(User.objects.values('first_name', 'last_name', 'email', 'id')) | |
| return JsonResponse(users, safe=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment