django-permanent-helpers
Django admin helper classes for django-permanent models.
Authored by Basil Shubin, inspired by django-taggit-helpers
Installation
First install the module, preferably in a virtual environment. It can be installed from PyPI:
pip install django-permanent-helpers
Setup
First make sure the project is configured for django-permanent.
Then add the following settings:
INSTALLED_APPS += (
'django_permanent_helpers',
)
Usage
PermanentModelAdmin
An abstract ModelAdmin which will include deleted objects in its listing and enable un-deleting feature.
from django_permanent_helpers.admin import PermanentModelAdmin
class MyModelAdmin(PermanentModelAdmin):
pass
PermanentModelListFilter
Filter records by their PERMANENT_FIELD
value, use together with PermanentModelAdmin
class.
from django_permanent_helpers.admin import PermanentModelAdmin, PermanentModelListFilter
class MyModelAdmin(PermanentModelAdmin):
list_filter = [PermanentModelListFilter]
Contributing
If you like this module, forked it, or would like to improve it, please let us know! Pull requests are welcome too. :-)
License
django-permanent-helpers
is released under the MIT license.