valdergallo / django-choices-flow Goto Github PK
View Code? Open in Web Editor NEWMeta Choice with simple flow and rules
Home Page: https://django-choice-flow.readthedocs.org/en/latest/
License: Other
Meta Choice with simple flow and rules
Home Page: https://django-choice-flow.readthedocs.org/en/latest/
License: Other
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 ]
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)
I forgot to test sub-choices and check if workflow work on sub-choices.
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]
Need remove models_test.py from build and add READ and LICENSE.
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
language: python
python:
before_install:
- sudo apt-get install -y libxml2-dev libxslt-dev
script:
make test
env:
install:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.