django-softdelete icon indicating copy to clipboard operation
django-softdelete copied to clipboard

No documentation

Open RedMoon32 opened this issue 5 years ago • 11 comments

It would be great if you add documentation on available model and queryset actions, because reading someone's code is not the best way to understand how system works, i can add it btw

RedMoon32 avatar Jun 27 '19 14:06 RedMoon32

I would really love to see some documentation because I would like to use the library, but I don't know how to. How does one implement it after installing it? As I understand, after it is implemented, you can just delete objects by calling .delete() on them.

HeinrichWizardKreuser avatar Jun 28 '19 18:06 HeinrichWizardKreuser

Interesting to know if this project still is maintained)

RedMoon32 avatar Jun 28 '19 18:06 RedMoon32

Oh, last commit 13 days ago so yeah, when i have time i will make pr for documentation

RedMoon32 avatar Jun 28 '19 18:06 RedMoon32

I see you have a similar library in your repositories https://github.com/RedMoon32/django-softdelete-it. You have actual steps and all so I decide to use that. If you think that scoursen's library is better (even without documentation), say so, but I'm going to try out yours firs

HeinrichWizardKreuser avatar Jun 28 '19 18:06 HeinrichWizardKreuser

Well, i would recommend to still use this library because softdelete-it is kinda piece of sh*t ) It uses UUID rather than boolean field in model. So again use this, btw main part is easy and i will describe it: https://github.com/scoursen/django-softdelete/blob/master/softdelete/models.py is a main file, as i understand main options in library are: -deleted_at field - time when model was deleted (or none if not), -obj.delete() which will set deleted_at to some time (if you call delete() to deleted object again it will be hard-deleted), obj.undelete(),
Model.objects will return all undeleted objects, Model.objects.all_with_deleted() will return all objects. Hope this will help)

RedMoon32 avatar Jun 28 '19 18:06 RedMoon32

Hi, I actually just ran into "badly formed hexadecimal UUID string" error when trying to access all_objects. If I can get past that, the rest should be fine. I've finished implementing it (lol, used a boolean field "deleted" before and just filtered through all objects that have deleted=False). Do you perhaps know how I can access all soft deleted objects? Let's say I have a Model "Item". I'm currently trying to access all soft deleted Items. I'm currently using Item.all_objects.only_deleted(), but it throws the "badly formed hexadecimal UUID string" error. Any help would be appreciated. However, if it is too much of a struggle and it seems impossible, I'll go to the original softdelete thing. It's just that I've already implemented yours is all so want to see if I can make it work

HeinrichWizardKreuser avatar Jun 28 '19 19:06 HeinrichWizardKreuser

Well, first it's not my) i just forked it, and again this lib is better

пт, 28 июн. 2019 г., 22:13 Heinrich [email protected]:

Hi, I actually just ran into "badly formed hexadecimal UUID string" error when trying to access all_objects. If I can get past that, the rest should be fine. I've finished implementing it (lol, used a boolean field "deleted" before and just filtered through all objects that have deleted=False). Do you perhaps know how I can access all soft deleted objects? Let's say I have a Model "Item". I'm currently trying to access all soft deleted Items. I'm currently using Item.all_objects.only_deleted(), but it throws the "badly formed hexadecimal UUID string" error. Any help would be appreciated. However, if it is too much of a struggle and it seems impossible, I'll go to the original softdelete thing. It's just that I've already implemented yours is all so want to see if I can make it work

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scoursen/django-softdelete/issues/57?email_source=notifications&email_token=AHSNMCI3D4ZAPHZDM2ZYAFLP4ZPEBA5CNFSM4H34MUF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY257WQ#issuecomment-506847194, or mute the thread https://github.com/notifications/unsubscribe-auth/AHSNMCJT7IVRMZVOUP6HHSTP4ZPEBANCNFSM4H34MUFQ .

RedMoon32 avatar Jun 28 '19 19:06 RedMoon32

Noted. In that case, if possible, please at doc to it? I'll work off of your current rough summary in the mean time. Thanks for all of your help! It is very much appreciated!

HeinrichWizardKreuser avatar Jun 28 '19 19:06 HeinrichWizardKreuser

  1. What is the name that I must use to inherit the deletemodel?
  2. What does the import line look like?
  3. Do I need to add any def() to my current classes that wish to implement it or does it work like the one you forked? (Where no extra def() is needed)

HeinrichWizardKreuser avatar Jun 28 '19 19:06 HeinrichWizardKreuser

Same here. Documentation would be nice for beginners like me. The readme is too vague. Does anyone know a better library?

RidenShark avatar Jul 09 '20 18:07 RidenShark

how the hell this library works, !

ahmedsafadii avatar Jul 04 '21 22:07 ahmedsafadii