Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename 'deleted' to 'deleted_on' #110

Closed
SarunasAzna opened this issue Aug 24, 2018 · 4 comments
Closed

rename 'deleted' to 'deleted_on' #110

SarunasAzna opened this issue Aug 24, 2018 · 4 comments

Comments

@SarunasAzna
Copy link

deleted field is a DateTimeField therefore I suggest to add _on to its name so it would be clear that it is DateTimeField. Now you could interpret it as BooleanField (it is BooleanField on version 0.3.x)
Apparently there is no Django convention for Date/DateTimeField so the suggestions is based with:

  1. Over frameworks conventions.
  2. Zen of Python mantra - Explicit is better than implicit. (DateTime/Boolean confusion violates that)
  3. Complicated app migrations (0.3x to 0.4.x and newer)
@Gagaro
Copy link
Member

Gagaro commented Sep 14, 2018

We should keep that in mind for the next major version. It would have make migrations less painful indeed.

@theY4Kman
Copy link

I love this! Since I'm looking to replace django-softdelete during an upgrade to Django 2.0, I might try my hand at this and submit a PR.

One suggestion, though: "deleted_at" vs "deleted_on", for DateTimeField vs DateField.

Row 456 was deleted on January 23, 2017

Row 456 was deleted at 8:37, January 23, 2017

@tombreit
Copy link

tombreit commented Jan 1, 2022

This feature seems to be already implemented and documented in the top level README.rst: and on RTD via the setting SAFE_DELETE_FIELD_NAME. Mentioned also in #162 .

@Gagaro
Copy link
Member

Gagaro commented Jan 3, 2022

Indeed, it is now configurabled.

@Gagaro Gagaro closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants