A replacement for Django's ArrayField with a multiple select form field.
Project description
Acknowledgement
This is a fork of the original code written by Silver Logic, available here.
About
A replacement for Django's ArrayField with a multiple select form field.
Please note that this selector makes sense only if the underlying base_field is using choices.
Installation
pip install django-array-field-select-multiple
How To Use
Replace all instances of your Django's ArrayField
model field with the new
ArrayField
. No functionality will be changed, except for the form field.
Example
from django.db import models
from array_field_select.fields import ArrayField
class Student(models.Model):
YEAR_IN_SCHOOL_CHOICES = (
('FR', 'Freshman'),
('SO', 'Sophomore'),
('JR', 'Junior'),
('SR', 'Senior'),
)
years_in_school = ArrayField(
models.CharField(max_length=2, choices=YEAR_IN_SCHOOL_CHOICES)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-array-field-select-multiple-0.3.0.tar.gz
.
File metadata
- Download URL: django-array-field-select-multiple-0.3.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e12406f2017ba540d89c656a5de933e207c42b1ec389e7abca03caabbdc09f9 |
|
MD5 | 8af9e2bbdde067d307eac59e9178a660 |
|
BLAKE2b-256 | 5ae3e387b7058bd3d7b43bbb8e858a9ba888db85e92f6138d1fbb06815649d92 |