django-safedelete
django-safedelete copied to clipboard
How does one import DELETED_VISIBLE_BY_PK?
from safedelete.models import SOFT_DELETE, HARD_DELETE, HARD_DELETE_NOCASCADE from safedelete.managers import DELETED_VISIBLE
But what about DELETED_VISIBLE_BY_PK? doesn't seem possible for safedelete.managers
Import from safedelete directly, see the source: https://github.com/makinacorpus/django-safedelete/blob/master/safedelete/init.py
@Gagaro, should the documentation change to reflect where to import these from, should they be imported in models.py as well, or perhaps both? What do other Django libraries do for constants? I personally put the constants directly into the models/managers. E.g.: SafeDeleteModel.HARD_DELETE.
Hi. thanks for the help! sorry for asking the same question in a different issue.
I prefer having them on the model as well.
We should update the doc to show where to import them from.