Skip to content

Commit

Permalink
Update readme (#22)
Browse files Browse the repository at this point in the history
* Update presentation

* pre commit update

* update dependencies
  • Loading branch information
pfouque authored Jul 5, 2024
1 parent b5ff9e9 commit c1318d6
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 187 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ repos:
- id: poetry-check
additional_dependencies:
- poetry-plugin-sort==0.2.0
- poetry-plugin-export==1.8.0
# FIXME: poetry lock export more platform on the CI
# - id: poetry-lock
# args: ["--no-update"]
Expand Down
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,24 @@

django-fsm adds simple declarative state management for django models.

Nice introduction is available here: <https://gist.github.com/Nagyman/9502133>

> 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>
## Alternatives
> [!IMPORTANT]
> Django FSM-2 started as a fork of [Django FSM](https://github.com/viewflow/django-fsm).
>
> Big thanks to Mikhail Podgurskiy for starting this awesome 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. [Viewflow](https://github.com/viewflow/viewflow) is presented as an alternative but the transition is not that easy.
>
> 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)
If you need parallel task execution, views and background task code reuse
over different flows - check my new project django-viewflow: <https://github.com/viewflow/viewflow>
## Introduction

## Objective
**FSM really helps to structure the code, and centralize the lifecycle of your Models.**

Instead of adding a state field to a django model and managing its
values by hand, you use `FSMField` and mark model methods with the
`transition` decorator. These methods could contain side-effects of the
state change.
Instead of adding a CharField field to a django model and manage its
values by hand everywhere, `FSMFields` offer the ability to declare your
`transitions` once with the decorator. These methods could contain side-effects, permissions, or logic to make the lifecycle management easier.


FSM really helps to structure the code, especially when a new developer
comes to the project. FSM is most effective when you use it for some
sequential steps.
Nice introduction is available here: <https://gist.github.com/Nagyman/9502133>

## Installation

Expand Down
Loading

0 comments on commit c1318d6

Please sign in to comment.