I got two handlers in Amazon Web Service. I want to share some data in both so i used global variable. where one is used to fetch some value and put it to the global variable when another handler called so is can use same value what is set in global variable, but it is giving default value in another handler and i have checked it is setting the value but in other one it is not giving same it is giving default value. One more imp thing is same code is runnning perfect in webfactional but same code is not running in AWS. Pls help what i have to do and thanks in advance. Here ma code is:
ipid_global = 0
uhid_global = 0
def patient_search:
global ipid_global
global uhid_global
patient = PatientInfo.objects.get(ip_id__iexact=ip_id)
dis_advice = PatientAdvice.objects.get(ip_id__iexact=ip_id)
ipid_global = int(patient.ip_id)
uhid_global = str(patient.uh_id)
def patient(request):
global ipid_global
global uhid_global
ip_id = ipid_global
uh_id = uhid_global
return HttpResponse(ipid_global)
In real it is indended properly...