def list(request): print "Got list request for pkgsinfo" pkgsinfo = Pkginfo.list() c = { 'pkgsinfo': pkgsinfo, } return render(request, 'pkgsinfo/list.html', context=c)
def list(request): print "Got list request for pkgsinfo" pkgsinfo = Pkginfo.list() c = {'pkgsinfo': pkgsinfo,} return render(request, 'pkgsinfo/list.html', context=c)
def getjson(request): print "Got json request for pkgsinfo" pkginfo_list = Pkginfo.list() # send it back in JSON format return HttpResponse(json.dumps(pkginfo_list), content_type='application/json')