You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating a traditional Flask+Jinja2 app to one with HTMX. Similar to #23, I'm using a block inside a loop.
I'm also using the special loop.index variable, which is when I'm getting: jinja2.exceptions.UndefinedError: 'loop' is undefined.
I know I can get around that by simply wrapping my iterable into list(enumerate(...)), but it'd probably make a smoother experience if loop was available.
Not sure if that's even possible. If not, it should probably be documented as a caveat.
🙏
The text was updated successfully, but these errors were encountered:
Hi,
I'm migrating a traditional Flask+Jinja2 app to one with HTMX. Similar to #23, I'm using a block inside a loop.
I'm also using the special
loop.index
variable, which is when I'm getting:jinja2.exceptions.UndefinedError: 'loop' is undefined
.I know I can get around that by simply wrapping my iterable into
list(enumerate(...))
, but it'd probably make a smoother experience ifloop
was available.Not sure if that's even possible. If not, it should probably be documented as a caveat.
🙏
The text was updated successfully, but these errors were encountered: