django-hidefield
Provides a field base class to hide fields in django admin. The class turns a field label in an admin edit form into a show/hide toggle link.
Tested with Django 4.2.
Installation
pip install django-hidefield- place
'hidefield'inINSTALLED_APPS
Usage
Build a custom field class for any model field type you want to hide.
The field has an additional argument hide with the following meaning:
'closed': the field is hidden at start'data': the field is hidden at start, if the field contains data (default)'no-data': the field is hidden at start, if the field contains no data'opened': (or any other value) the field is shown at start
Example
from django.db import models
from hidefield.fields import HideField
class HideCharField(HideField, models.CharField):
pass
class MyModel(models.Model):
name = HideCharField(max_length=32, hide='data')
See exampleapp for more examples.
Metadata
Release files for django-hidefield 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-hidefield-0.2.0.tar.gz | 4.2 kB | Without provenance | Details for django-hidefield-0.2.0.tar.gz |
Release files / django-hidefield-0.2.0.tar.gz
| Download URL | django-hidefield-0.2.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7c3226ea6ff5e3abb3325f9ba667cf11cf92919e2d8aeb72728904d6f4b7c9e
|
|
BLAKE2b-256 checksum How to use checksums |
20b081325004f257952bd07cf32119255c0a6d68a9806513a5f26931a87093dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for django-hidefield 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.