Hey, I want to process one attribute of every object inside one queryset, and after that I want to return the JSON format? How to do with that?
results = Sample.objects.filter(user=user)
For example, I want to manually add an ‘*’ after user’s name field, and then return as JSON format? or remain the queryset type?
You can loop over a query set, and each element is a single object, so something like:
play with it at the Django shell.
JSON format? oh someone else can do that!