0Pricing
Django Academy · Lesson

DeleteView and success_url

Confirm deletions and redirect afterward.

Removing Records Safely

Sometimes data has to go. DeleteView handles removing a record, with a confirmation step built in. 🗑️

Meet DeleteView

DeleteView loads one object by its pk and prepares to delete it once the user confirms.

from django.views.generic import DeleteView

class PostDelete(DeleteView):
    model = Post

All lessons in this course

  1. ListView and DetailView
  2. CreateView and UpdateView
  3. DeleteView and success_url
  4. Overriding get_queryset and Templates
← Back to Django Academy