Ejemplo n.º 1
0
def get_all_groups(request):
    """ Return Http request of json with all groups data. """
    # get all the group data from database and serialize it into json
    groups = controllers.get_all_groups()
    json_data = serializers.serialize("json", groups)

    return HttpResponse(json_data, mimtype="application/son")
Ejemplo n.º 2
0
def get_all_groups(request):
    ''' Return Http request of json with all groups data. '''
    # get all the group data from database and serialize it into json
    groups = controllers.get_all_groups()
    json_data = serializers.serialize("json", groups)

    return HttpResponse(json_data, mimtype="application/son")
Ejemplo n.º 3
0
def get_all_groups(request):
	''' Does not take in a request(?). Return a request with all the groups in json format '''
	# get QuerySet of all groups
	groups = controllers.get_all_groups()
	json_data = serializers.serialize('json', groups)
	return HttpResponse(json_data, mimetype = 'application/json', status = 200)