🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

django-array-field-select-multiple

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-array-field-select-multiple

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

0.3.1
PyPI
Maintainers
1

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)
    )

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts