MCPcopy Create free account
hub / github.com/vercel/examples / note_delete

Function note_delete

python/django-notes/notes/views.py:46–53  ·  view source on GitHub ↗
(request, pk)

Source from the content-addressed store, hash-verified

44
45
46def note_delete(request, pk):
47 if settings.READ_ONLY:
48 return HttpResponseForbidden("This demo is read-only.")
49 note = get_object_or_404(Note, pk=pk)
50 if request.method == "POST":
51 note.delete()
52 return redirect("note_list")
53 return redirect("note_detail", pk=note.pk)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected