pinax-models icon indicating copy to clipboard operation
pinax-models copied to clipboard

Documentation Wrong and/or Removal of Code from __init__.py Bad

Open JordanReiter opened this issue 8 years ago • 0 comments

A recent commit by @paltman removed

from .admin import LogicalDeleteModelAdmin  # noqa
from .models import LogicalDeleteModel  # noqa

from the init.py file in pinax/models.

I'm not sure why it was removed, and note that it is a backwards-incompatible move that is also not yet reflected in the main ReadMe documentation:

Inherit from pinax.models.LogicalDeleteModel for all models that you wish to share in this functionality.

The documentation should be updated to read (assuming that the code must remain unchanged):

Inherit from pinax.models.models.LogicalDeleteModel for all models that you wish to share in this functionality.

I would suggest re-instating the original code unless there is a compelling reason it needed to be removed. As far as I can tell its inclusion in the init.py file did not cause any compatibility problems w/Django 1.10 (the reason presented in the commit).

Note that if people are using pinax.models.models.LogicalDeleteModel, they are not affected by this code being restored, but if their code was written following the instructions in the documentation (subclassing pinax.models.LogicalDeleteModel), all of it will have to be rewritten.

JordanReiter avatar Jan 27 '17 21:01 JordanReiter