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.1.tar.gz (3.3 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-array-field-select-multiple-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c72900aca72f7b452ca26ee75e4bb64862efecda062061135e87a6969fbf5c4c
MD5 89cac73d1bb1d23d08b9ae5fa1cb1686
BLAKE2b-256 0acd98072efe6361acd1c806b718d5bb8814e78fac0dbd0181e5cdd0e2c68d0b

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