'str' object has no attribute 'META'
Django's serializers are only for serializing QuerySet
s, but you're passing it a dict
. If you want to serialize a dict
, perhaps you're looking for Python's built-in json
module.
json_serializer.serialize is supposed to be used with a queryset. More info here.
You should be able to achieve the same with this:
import json
data = json.dumps({ 'participant_specific_donation' : info , 'participant_specific_milestone' : info1 })
Hope this helps.