Git Product home page Git Product logo

Comments (4)

kmmbvnr avatar kmmbvnr commented on May 23, 2024

The idea of fsm is not to set state directly at all, So unprotected is just a way not to check it by fsm, but anyway it should be avoided by the developer.

Having ability to directly set the state can't be implemented, b/c you can have several transition attached to the same source-target pair and django-fsm will not able to select the correct one.

from django-fsm.

kmmbvnr avatar kmmbvnr commented on May 23, 2024

Btw - https://github.com/kmmbvnr/django-fsm/pull/68/files#diff-7b4b9604f1842ff54833d14e644e9710R127

from django-fsm.

spectras avatar spectras commented on May 23, 2024

Excellent point, I did not envision there could be several transitions with the same source/target pair.
Thanks a lot for answering so fast.

from django-fsm.

kmmbvnr avatar kmmbvnr commented on May 23, 2024

Yeah, but it's a good idea to create a simpler library than django_fsm with the state field with list of transitions and no @transition decorator over methods, to avoid such things like duplicate transitions.

from django-fsm.

Related Issues (20)

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.