Remove fields date_created and date_modified#17
Open
ron8mcr wants to merge 1 commit into
Open
Conversation
These fields are redundant for logical deletion. Model itself named ``LogicalDeleteModel`` and seeing this fields inside it are surprising. Also, there are a few apps that provide similarly functionality: * https://github.com/django-extensions/django-extensions It has ``django_extensions.db.models.TimeStampedModel`` * https://github.com/carljm/django-model-utils It has ``model_utils.models.TimeStampedModel`` So if somebody started to use one of this app or some another, and then wants to start using ``pinax-models`` with logical delete feature, he will get confusing by duplicating fields
date_created and date_modified|
django-model-utils also includes https://django-model-utils.readthedocs.io/en/latest/models.html#softdeletablemodel , which provides soft-deletion. If you only want some fields, and not all, maybe better to just use that package. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These fields are redundant for logical deletion.
Model itself named
LogicalDeleteModeland seeingthis fields inside it are surprising.
Also, there are a few apps that provide similarly
functionality:
It has
django_extensions.db.models.TimeStampedModelIt has
model_utils.models.TimeStampedModelSo if somebody started to use one of this app or some another,
and then wants to start using
pinax-modelswith logicaldelete feature, he will get confusing by duplicating fields