Django deleteview edit performance
I'm new in Django, I'm learning class based view and all works fine, what I'm trying to do is to edit the DeleteView performance, this just delete de object but what im looking is to edit the object instead of delete
class borrar(DeleteView):
model = Usuario
template_name = "usuario_confirm_delete.html"
success_url = '/alta/'
I would like to edit but I do not know how to achieve this.
Usuario.objects.filter(id=23).update(activo='False')
Any idea ?
Use UpdateView
to edit objects.