#36412 closed New feature (wontfix)
Add redirect_with_message() shortcut for simplified redirects with Django messages
Reported by: | Mobin Ghaemi | Owned by: | |
---|---|---|---|
Component: | Core (Other) | Version: | 5.1 |
Severity: | Normal | Keywords: | shortcuts redirect message |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This ticket introduces a new redirect_with_message() shortcut in django.shortcuts.
The goal is to simplify common patterns where a user is redirected to a URL and a message is attached via Django’s messaging framework.
This new utility:
Accepts request, target url, message text, and optional msg_type (info, success, error, etc.)
Internally calls messages.add_message() and returns HttpResponseRedirect
Enhances code readability and consistency in views
Change History (2)
comment:1 by , 3 months ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 3 months ago
https://forum.djangoproject.com/t/account-temporarily-on-hold/41074/2
Please re-open if acceptable. Thanks!
Thank you for your suggestion! When suggesting a new feature for Django, the feature idea should first be proposed and discussed with the community. To do that, please raise this on the new feature tracker.
I'll close the ticket for now, but if the community agrees with the proposal, please return to this ticket and reference the discussion so we can re-open it. For more information, please refer to the documented guidelines for requesting features.