Django better admin ArrayField
This is a fork from gradam/django-better-admin-arrayfield
Better ArrayField widget for admin
Supported Python versions: 3.5, 3.6, 3.7 Supported Django versions: 1.11, 2.0, 2.1, 2.2
It changes comma separated widget to list based in admin panel.
Before:
After:
Quickstart
Install Django better admin ArrayField:
pip install maykin-django-better-admin-arrayfield
Add it to your `INSTALLED_APPS`:
INSTALLED_APPS = (
...
'django_better_admin_arrayfield.apps.DjangoBetterAdminArrayfieldConfig',
...
)
Usage
django_better_admin_arrayfield.models.fields.ArrayField is a drop-in replacement for standard Django ArrayField.
Import it like below and use it in your model class definition.
from django_better_admin_arrayfield.models.fields import ArrayField
Import DynamicArrayMixin like below
from django_better_admin_arrayfield.admin.mixins import DynamicArrayMixin
In your admin class add DynamicArrayMixin:
...
class MyModelAdmin(admin.ModelAdmin, DynamicArrayMixin):
That's it.
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Pre-commit hooks
Install pre-commit black hook
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_dev.txt
(myenv) $ pre-commit install
Credits
https://github.com/gradam for creating the initial package
Inspired by: https://stackoverflow.com/a/49370480/4638248
Tools used in rendering this package:
History
1.0.4 (2019-09-02)
- Can add item after removing everything from the list
1.0.3 (2019-09-02)
- Can add item after removing everything from the list
- Do not call static at startup time
1.0.2 (2019-04-03)
- If field is required empty list raises ValidationError on clean.
1.0.1 (2019-02-23)
- Empty list is no longer recognized as changed.
1.0.0 (2019-02-21)
- First release on PyPI.
Metadata
Release files for maykin-django-better-admin-arrayfield 1.0.5
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 |
|---|---|---|---|---|
| maykin-django-better-admin-arrayfield-1.0.5.tar.gz | 9.5 kB | Without provenance | Details for maykin-django-better-admin-arrayfield-1.0.5.tar.gz |
Release files / maykin-django-better-admin-arrayfield-1.0.5.tar.gz
| Download URL | maykin-django-better-admin-arrayfield-1.0.5.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4f87294cbd60770df6f46c88d17707f6c6fdcf0a13760e858c7417d11ca2c64
|
|
BLAKE2b-256 checksum How to use checksums |
806251ce2852a13874a0169650a98af236511542e1c5827680013a458b89875c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Security for maykin-django-better-admin-arrayfield 1.0.5
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.