5 main interface to server
22 """for test working server"""
23 return django.http.HttpResponse(
"MyApp server" )
25 def ajax(request, module, function):
26 """dispatch ajax requests"""
28 fun = getattr(getattr(globals()[str(module)],
'views'), str(function))
29 data = json.dumps( fun(request.GET) )
30 return django.http.HttpResponse(data, content_type=
'application/json')
31 except Exception
as e:
32 return django.http.HttpResponseNotFound(
"myapp ajax error: " + str(traceback.format_exc()) )
34 return django.http.HttpResponseNotFound(
"myapp ajax system error " )