Hi I need to to assign dynamic name to a variable I use blow code : for item,value in request.POST.items(): if item=="kid_room" vars()[item]="ok" list.append({"a":kid_room}) data=simplejson.dumps(list,cls=DjangoJSONEncoder) return HttpResponse(data, mimetype="application/json")
which kid_room is request.POST item but i got error that kid_room is not defined which means vars()[item]="ok" dose not work please help -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/o7lbR_yCSWUJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.