-
Notifications
You must be signed in to change notification settings - Fork 49
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
htmx:redirect:/path
and new HtmxDirectView("/path")
have different behaviour regarding RedirectAttributes
#144
Comments
I tried to investigate how to fix it, but I don't quite understand the code at |
There should be, or rather, there is no difference between string-based and view-based redirects. BTW the To be really sure, I have created two new tests for this in #145. |
Mhhh you're right @wimdeblauwe. The tests in #145 fail. Didn't check the result before I added my comment 😄 Let me check what's going on here. |
Bad news. It won't work for string-based redirects because we need to set Of course, this is anything but nice. So what should we do? Point this out in the README or remove support for string-based redirects. |
Thanks for investigating this. Changing the prefix seems the best option. I tried it in my example with the changes you did in the PR and it works fine. I'll do a 3.6.1 release with the fix. |
I am writing a blog post on redirect attributes and I was testing this with the new 3.6.0 release. What I have discovered is that there is a difference when using
htmx:redirect:/path
versusnew HtmxDirectView("/path")
. The flash attributes are not present after the redirect in the first case, but they do work fine when usingnew HtmxDirectView("/path")
.The text was updated successfully, but these errors were encountered: