def post(self, request, obj, id): if request.POST['submit'] == 'tak': to_delete = DeleteView.get_obj(obj, id) to_delete.delete() return redirect('twitter:entries')
def get(self, request, obj, id): to_delete = DeleteView.get_obj(obj, id) ctx = { 'to_delete': to_delete, } return render(request, 'twitter/delete.html', ctx)