예제 #1
0
 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')
예제 #2
0
 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)