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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58741a151a8ecbe880aed86701f480605feb6fe82ffe0713a23f65ce82ad5d4e |
|
MD5 | 96cac06522444fa80c500a6d99696f74 |
|
BLAKE2b-256 | 39f6686f985d391a8eb5dda5ce5a91cd939b43b784a7eb4ce6a883ddd05bb0c8 |
Hashes for django_permanent_helpers-0.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09307e9d6d2ae5dca8de0f6ceee4ff9f939ba4d985f6932eab63acef726f0c52 |
|
MD5 | 8ecb281e344ed38248ff8f656e7ffdaa |
|
BLAKE2b-256 | 662d49dedd21850fcfe19654642ddc97ca81163682733a5fc24a5ac009079dc0 |