示例#1
0
文件: views.py 项目: bartreardon/mwa2
def list(request):
    print "Got list request for pkgsinfo"
    pkgsinfo = Pkginfo.list()
    c = {
        'pkgsinfo': pkgsinfo,
    }
    return render(request, 'pkgsinfo/list.html', context=c)
示例#2
0
文件: views.py 项目: wollardj/mwa2
def list(request):
    print "Got list request for pkgsinfo"
    pkgsinfo = Pkginfo.list()
    c = {'pkgsinfo': pkgsinfo,} 
    return render(request, 'pkgsinfo/list.html', context=c)
示例#3
0
文件: views.py 项目: wollardj/mwa2
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')
示例#4
0
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')