Skip to content

Attempting to implement conditional views generates the error RecursionError: maximum recursion depth exceeded #264

Open
@ghost

Description

Hello! I'm trying to implement Django Wizard's conditional view in my project but I can't. Whenever I access my form page, I receive the error: RecursionError: maximum recursion depth exceeded
.

I investigated what is generating this error with ipdb and found that the WizardView.get_cleaned_data_for_step(step) method

is causing the problem.

I would like help to know if I implemented the feature correctly or if this is a bug.

NT. I want it to work as follows:

In the PessoaForm form there is a checkbox field where my user must select one of two options: PF or PJ. If he selects PF then the next form displayed should be the PessoaFisicaForm and if he selects the PJ option, then the PessoaJuridicaForm form should be displayed.

These are my forms

Screenshot from 2024-01-18 15-40-35

This is my view
Screenshot from 2024-01-18 15-41-33

and this is the callable that you create according to the documentation guidance

Screenshot from 2024-01-18 15-41-56

Error generated

Screenshot from 2024-01-18 16-11-22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions