django admin helper classes for django-permanent models
Project description
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
Configuration
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 import PermanentModelAdmin
# For Django 1.9+, use this instead:
# 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 import PermanentModelAdmin, PermanentModelListFilter
# For Django 1.9+, use this instead:
# 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. :-)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-permanent-helpers-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02cfa3d98e1645bbbc9c76297b5ae50757ae7e74bdd5a297371f06109062ea38 |
|
MD5 | e498e7b4ca0c139f77c7dcf7d5d5f3ac |
|
BLAKE2b-256 | 73ad17f2a714a5b496073f0bd57dda832eb175b953cc051f7c236f75440835ab |
Hashes for django_permanent_helpers-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c29a07c2febd82267c2260bb42b23278b77237c1fbe774fa78ecd4488a946229 |
|
MD5 | 3ceefc3e3a8f9337577a6efc5d6c9ba0 |
|
BLAKE2b-256 | 571938ae9fcc2ae53c94173cb412f8d397de0c12e9762db9436edb127fe366d2 |