I have a python function in the view which returns an object, now i want to call this function from another function which actually returns HTTPResponse. How can i return both the python object and AJAX response together? First method returning python object.
def Populate_Config_Resources():
data = ResourceManager.objects.filter(verified = 1)
return data
second method returning httpresponse.
def Update_ResourceManager(request):
try:
do something...
except Exception,e:
return HttpResponse(e)
# here I call that function.
config_data = Populate_Config_Resources()
return HttpResponse('success')