Skip to content

Remove fields date_created and date_modified#17

Open
ron8mcr wants to merge 1 commit into
pinax:masterfrom
Saritasa:remove-date-created-modified
Open

Remove fields date_created and date_modified#17
ron8mcr wants to merge 1 commit into
pinax:masterfrom
Saritasa:remove-date-created-modified

Conversation

@ron8mcr
Copy link
Copy Markdown

@ron8mcr ron8mcr commented Dec 27, 2016

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:

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

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
@ron8mcr ron8mcr changed the title Remove fields date_created and date_modified Remove fields date_created and date_modified Dec 27, 2016
@jayvdb
Copy link
Copy Markdown

jayvdb commented Feb 16, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants