Skip to content

StepsHelper is not iterable #275

Open
@nerdoc

Description

A StepsHelper must be made iterable to create useful wizard steps graphics, e.g. in Django (any jinja2 template too):

  <ul class="steps steps-counter">
    {% for step in wizard.steps %}
      <li class="step-item{% if wizard.steps.current == step %} active{% endif %}">{{ step }}</li>
    {% endfor %}
  </ul>

You need to iter over the wizard steps to do that, but the StepsHelper class is not iterable.

I may add a simple PR to do that?

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