turbo_helper.shortcuts¶
Functions¶
|
Sends an HTTP 303 redirect. |
|
|
|
Inspired by Rails |
Module Contents¶
- turbo_helper.shortcuts.redirect_303(to, *args, **kwargs)¶
Sends an HTTP 303 redirect.
All arguments are forwarded to django.shortcuts.resolve_url to generate the redirect URL.
- Parameters:
to (Union[str, django.db.models.Model])
- Return type:
- turbo_helper.shortcuts.get_respond_to(request)¶
- turbo_helper.shortcuts.respond_to(request)¶
Inspired by Rails
https://www.writesoftwarewell.com/how-respond_to-method-works-rails/
- respond_to do |format|
format.turbo_stream { render turbo_stream: turbo_stream_template }
end