Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

FSMField and django model validation integration #120

@khlumzeemee

Description

@khlumzeemee

Hi,
is it possible to create a condition for the object creation with the same syntax that exists for other transitions?

Say I have a default state = FsmField(default='new'), the only way I found to check the initial conditions is to use the clean or save methods and check that the id is null and then run some initial tests.

I would have been nice to be able to do it in the same fashion as all the other state related tests.

Is it possible to do it that way? How would you recommend to implement this using django-fsm?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions