|
8 | 8 |
|
9 | 9 | django-fsm adds simple declarative state management for django models. |
10 | 10 |
|
11 | | -Nice introduction is available here: <https://gist.github.com/Nagyman/9502133> |
12 | | - |
13 | | -> Django FSM-2 is a fork of Django FSM. Big thanks to Mikhail Podgurskiy for starting and this project and maintaining it for so many years. Unfortunately, development has stalled for almost 2 years and it was officially announced there will be no new releases. Django FSM-2 is the new updated version of Django FSM, with dependencies updates, typing (planed). Original repository: <https://github.com/viewflow/django-fsm> |
14 | | -
|
15 | | -## Alternatives |
| 11 | +> [!IMPORTANT] |
| 12 | +> Django FSM-2 started as a fork of [Django FSM](https://github.com/viewflow/django-fsm). |
| 13 | +> |
| 14 | +> Big thanks to Mikhail Podgurskiy for starting this awesome project and maintaining it for so many years. |
| 15 | +> |
| 16 | +> Unfortunately, development has stalled for almost 2 years and it was officially announced there will be no new releases. [Viewflow](https://github.com/viewflow/viewflow) is presented as an alternative but the transition is not that easy. |
| 17 | +> |
| 18 | +> If what you need is just a simple state machine, tailor-made for Django, Django FSM-2 is the successor of Django FSM, with dependencies updates, typing (planned) |
16 | 19 |
|
17 | | -If you need parallel task execution, views and background task code reuse |
18 | | -over different flows - check my new project django-viewflow: <https://github.com/viewflow/viewflow> |
| 20 | +## Introduction |
19 | 21 |
|
20 | | -## Objective |
| 22 | +**FSM really helps to structure the code, and centralize the lifecycle of your Models.** |
21 | 23 |
|
22 | | -Instead of adding a state field to a django model and managing its |
23 | | -values by hand, you use `FSMField` and mark model methods with the |
24 | | -`transition` decorator. These methods could contain side-effects of the |
25 | | -state change. |
| 24 | +Instead of adding a CharField field to a django model and manage its |
| 25 | +values by hand everywhere, `FSMFields` offer the ability to declare your |
| 26 | +`transitions` once with the decorator. These methods could contain side-effects, permissions, or logic to make the lifecycle management easier. |
26 | 27 |
|
27 | | - |
28 | | -FSM really helps to structure the code, especially when a new developer |
29 | | -comes to the project. FSM is most effective when you use it for some |
30 | | -sequential steps. |
| 28 | +Nice introduction is available here: <https://gist.github.com/Nagyman/9502133> |
31 | 29 |
|
32 | 30 | ## Installation |
33 | 31 |
|
|
0 commit comments