GithubHelp home page GithubHelp logo

namex44 / django-array-field-select Goto Github PK

View Code? Open in Web Editor NEW

This project forked from palm86/django-array-field-select

0.0 0.0 0.0 6 KB

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

License: MIT License

Python 100.00%

django-array-field-select's Introduction

About

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

Installation

pip install django-array-field-select

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

django-array-field-select's People

Contributors

jjmontalbo avatar namexripple avatar ryanpineo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.