def delete_image(request):
    src = request.POST.get('src')
    try:
        Image.delete(src)
        return Response(json.dumps('ok'))
    except:
        raise Exception('Could not delete image')
Exemple #2
0
def delete_image(request):
    src = request.POST.get('src', '')
    try:
      Image.delete(src)
      return HttpResponse('ok', content_type="application/json")
    except:
      raise Exception('Could not delete image')
Exemple #3
0
def delete_image():
    src = request.form.get('src')
    try:
      Image.delete(src)
      return json.dumps('ok')
    except:
      raise Exception('Could not delete image')