Code Monkey home page Code Monkey logo

django-choices-flow's People

Contributors

pv8 avatar rennerocha avatar valdergallo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

pv8 fremeva

django-choices-flow's Issues

need create one validate choice type

If somebody create one option with bad format. Choice just create one error on set_data, that user can undestand what´s happen.

Example:

from django_choices_flow import Choices

class MyChoices(Choices):
    NEW = 1, 'New content' # 'New content' is the display text
    WAIT = 2, 'Wait'

    WAIT = [NEW ]

Bug on _set_data with value -1

Update set date to

def _set_data(cls, name, value, parent_name=None):
        "Update tuplas to objects"
        if not name.startswith('_') and not callable(value):
            if isinstance(value, tuple):
                cls._data.append(value)
            if isinstance(value, list) and '_RULES' in name.upper():
                cls._set_rules(name, value)

Test sub-choices

I forgot to test sub-choices and check if workflow work on sub-choices.

Create State with more than one '_'

When I create one Rule with more than one _, ChoiceFlow lost values.

Example:

  PARTIALLY_VALIDATED_RULES
  ChoicesFlow return 
  PARTIALLY

base.py

   -49. updated_name = name.split('_')[0]
   +49. updated_name = name.rsplit('_', 1)[0]

fix build

Need remove models_test.py from build and add READ and LICENSE.

add suport for south > 0.6

Add this function in custom fields

    def south_field_triple(self):
        try:
            from south.modelsinspector import introspector
            cls_name = '{0}.{1}'.format(
                self.__class__.__module__,
                self.__class__.__name__)
            args, kwargs = introspector(self)
            return cls_name, args, kwargs
        except ImportError:
            pass

add travis tests

language: python

python:

  • 2.6
  • 2.7

before_install:
- sudo apt-get install -y libxml2-dev libxslt-dev

script:
make test

env:

  • DJANGO=1.4.5
  • DJANGO=1.5.1

install:

  • pip install -q Django==$DJANGO -r example/requirements.txt

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.