D
D
daner072022-03-26 13:02:40
Django
daner07, 2022-03-26 13:02:40

How to Archive Django Users on Deletion?

How can users be archived in Django so they can be brought back when needed?

Method, through active or not active is_enabled - not correct.

So that approximately when the User.restore(iin: str = 'testiin') function is called, the record is restored.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2022-03-26
@bacon

don’t delete it, but put a mark on deletion, well, override the delete method and manager for the model for this

D
Dmitry Shitskov, 2022-03-26
@Zarom

Soft Delete https://adriennedomingus.com/blog/soft-deletion-in...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question