Beispiel #1
0
def showContinentData(request):
    continentNames = request.POST.get('continents')
    #continentNames = ['Asia','Africa']
    continentNames = json.loads(continentNames)  # reverts the stringification of json
    print(continentNames)
    context = {
        'cp' : qpgt.getContinentPopulationsNew(continentNames)
        #'cp':continentName
    }
    return HttpResponse(json.dumps(context))
Beispiel #2
0
def showContinentData(request):
    continentName = request.POST.get('continents')
    context = {'cp': qpgt.getContinentPopulationsNew(continentName)}
    return HttpResponse(json.dumps(context))