Exemple #1
0
def app_fetch(request, pk):
	myToken = csrf(request)
	api = GooglePlay().auth()
	myFile = tempfile.NamedTemporaryFile()
	success = api.download(pk, myFile.name)
	if success:
		details = api.details(pk)
		myApp = process_package(myFile, details)
		return HttpResponseRedirect('/frontpage/')
		# if isinstance(myApp, App):
		# 	return HttpResponseRedirect('/frontpage/'+str(myApp.id)+'/')
		# else:
		# 	context = {"errmsg": myApp}
		# 	return render_to_response('frontpage/error.html', RequestContext(request, context))
	else:
		return HttpResponseRedirect('/frontpage/error/')
Exemple #2
0
def app_fetch(request, pk):
    myToken = csrf(request)
    api = GooglePlay().auth()
    myFile = tempfile.NamedTemporaryFile()
    success = api.download(pk, myFile.name)
    if success:
        details = api.details(pk)
        myApp = process_package(myFile, details)
        return HttpResponseRedirect('/frontpage/')
        # if isinstance(myApp, App):
        # 	return HttpResponseRedirect('/frontpage/'+str(myApp.id)+'/')
        # else:
        # 	context = {"errmsg": myApp}
        # 	return render_to_response('frontpage/error.html', RequestContext(request, context))
    else:
        return HttpResponseRedirect('/frontpage/error/')
Exemple #3
0
def app_details(request, pk):
	api = GooglePlay().auth()
	details = api.details(pk)
	context = {'details':details}
	return render_to_response('frontpage/app_metadata.html', RequestContext(request, context))
Exemple #4
0
def app_details(request, pk):
    api = GooglePlay().auth()
    details = api.details(pk)
    context = {'details': details}
    return render_to_response('frontpage/app_metadata.html',
                              RequestContext(request, context))