Skip to main content

A replacement for Django's ArrayField with a multiple select form field.

Project description

A replacement for Django’s ArrayField with a multiple select form field. This only makes sense if the underlying base_field is using choices.

How To Use

Replace all instances of your Django 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-0.2.0.tar.gz (2.0 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-array-field-select-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8e847dc9f8c34c41c89f551ff290cf0dee54c8c3e8cb3ec33fb7e1fe6fbf94db
MD5 5efa959d6494c3298d64a366aed9c0e8
BLAKE2b-256 cefc17653ac004a1047fff0dae4e019fb041472eea109fca41962652dad20faa

See more details on using hashes here.

Supported by

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