Coder Social home page Coder Social logo

django-js-choices's People

Contributors

ckarli avatar lorinkoz avatar luisiacc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-js-choices's Issues

Option for use just the medium name or the full name

It's cool that this automatically resolves the choices names conflicts. But, if you add a new choice or a package with a choice that collides with yours then the short name will be removed without notice. I think will be useful to select what names you want to make available so in advance you always know what model's choices you are using.

Tidy up project

Cut new version with the following changes:

  • Remove Python 2 compat.
  • Remove Django <2 compat.
  • Remove embedded rjsmin and provide as extra package.
  • Add tests

Add ability to register new sources other than just fields from models

I'd like the ability to add new sources of "choices" that are not from django models fields directly, but instead like some value,label pairs used for some custom logic that are not on any models and wants to be synced to a javascript frontend; I think django_js_choices would be a good place to put such logic.

I would imagine it to be something like this:

from django_js_choices import register_source

# some variable with value,label keys
DOABLE_ACTIONS = [("nothing", "Do nothing"), ("go_2", "Advance 2 steps"), ...]

register_source("doable_actions", DOABLE_ACTIONS)

What do you think? I'd be down for filling a PR for it.

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.