Skip to main content

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

https://img.shields.io/pypi/v/django-permanent-helpers.svg https://img.shields.io/pypi/dm/django-permanent-helpers.svg https://img.shields.io/github/license/bashu/django-permanent-helpers.svg

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

django-permanent-helpers-0.0.6.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

django_permanent_helpers-0.0.6-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file django-permanent-helpers-0.0.6.tar.gz.

File metadata

  • Download URL: django-permanent-helpers-0.0.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for django-permanent-helpers-0.0.6.tar.gz
Algorithm Hash digest
SHA256 02cfa3d98e1645bbbc9c76297b5ae50757ae7e74bdd5a297371f06109062ea38
MD5 e498e7b4ca0c139f77c7dcf7d5d5f3ac
BLAKE2b-256 73ad17f2a714a5b496073f0bd57dda832eb175b953cc051f7c236f75440835ab

See more details on using hashes here.

File details

Details for the file django_permanent_helpers-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: django_permanent_helpers-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for django_permanent_helpers-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c29a07c2febd82267c2260bb42b23278b77237c1fbe774fa78ecd4488a946229
MD5 3ceefc3e3a8f9337577a6efc5d6c9ba0
BLAKE2b-256 571938ae9fcc2ae53c94173cb412f8d397de0c12e9762db9436edb127fe366d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page