As Pankaj mentioned, add a field in your model called status or something like that. On the makemigrations set all status as 'Active'
Then, your function will not delete, will update the object.
def delete(request,id):
employee=Employee.objects.get(id=id)
employee.status = 'Inactive'
return redirect('/home1')
in your listview, you should only show active records, for that add an exclude to the queryset.
queryset = Model.objects.exclude(status='Inactive')
or with a filter
queryset = Model.objects.filter(status='Active')
If you want to use delete, I've used before django-simple-history. the package records all history for models and objects and let you query that information.
Regards,
Julio Cojom.