Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-array-field-select-multiple-0.3.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file django-array-field-select-multiple-0.3.2.tar.gz.

File metadata

File hashes

Hashes for django-array-field-select-multiple-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ae5a4f2110aac266e66a4ac5205fe85e8735fc41a0b4ad9b4184ba05589e9d12
MD5 98eca12b2125c39dfb93f075a71c6ffd
BLAKE2b-256 6e4972ac901b7f2b9b61491939e478ceae5c92be21a6c316de71108177f22756

See more details on using hashes here.

Supported by

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