def concept_value(request): if request.method == 'DELETE': data = JSONDeserializer().deserialize(request.body) if data: with transaction.atomic(): value = ConceptValue(data) value.delete_index() value.delete() return JSONResponse(value) return HttpResponseNotFound
def concept_value(request): if request.method == 'DELETE': data = JSONDeserializer().deserialize(request.body) if data: with transaction.atomic(): value = ConceptValue(data) value.delete_index() value.delete() return JSONResponse(value) if request.method == 'GET': valueid = request.GET.get('valueid') value = models.Value.objects.get(pk=valueid) return JSONResponse(value) return HttpResponseNotFound