def get_material(request, material_id):
    material = get_object_or_404(Material, pk=material_id)
    vertSource = '{}'.format(material.getVertex())
    fragSource = '{}'.format(material.getFragment())
    return HttpResponse('{{\n\t\t\t"id":{0},\n\t\t\t"vertex":"{1}",\n\t\t\t"fragment":"{2}"\n\t\t}}\n\t\t'.format(material.id, base64.b64encode(vertSource), base64.b64encode(fragSource)))
def get_material(request, material_id):
    material = get_object_or_404(Material, pk=material_id)
    vertSource = '{}'.format(material.getVertex())
    fragSource = '{}'.format(material.getFragment())
    return HttpResponse('{{\n\t\t\t"id":{0},\n\t\t\t"vertex":"{1}",\n\t\t\t"fragment":"{2}"\n\t\t}}\n\t\t'.format(material.id, base64.b64encode(vertSource), base64.b64encode(fragSource)))