Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StepsHelper is not iterable #275

Open
nerdoc opened this issue Jul 8, 2024 · 1 comment · May be fixed by #276
Open

StepsHelper is not iterable #275

nerdoc opened this issue Jul 8, 2024 · 1 comment · May be fixed by #276

Comments

@nerdoc
Copy link

nerdoc commented Jul 8, 2024

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?

nerdoc added a commit to nerdoc/django-formtools that referenced this issue Jul 8, 2024
@nerdoc nerdoc linked a pull request Jul 8, 2024 that will close this issue
@nerdoc
Copy link
Author

nerdoc commented Jul 8, 2024

It could be a workaround (or a solution?) to use for step in wizard.steps.all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant