[Django] #36413: Add delayed_redirect() shortcut for HTML-based client-side redirection

9 views
Skip to first unread message

Django

unread,
May 23, 2025, 9:23:22 AM5/23/25
to django-...@googlegroups.com
#36413: Add delayed_redirect() shortcut for HTML-based client-side redirection
-------------------------------------+-------------------------------------
Reporter: Mobin Ghaemi | Type: New
| feature
Status: new | Component: Core
| (Other)
Version: 5.1 | Severity: Normal
Keywords: shortcuts redirect | Triage Stage:
delay | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
This new utility provides a shortcut to perform client-side redirects via
a delay.

Accepts a request, target URL, and an optional delay (in seconds).
Useful for displaying confirmation messages before redirecting.

See PR: https://github.com/django/django/pull/19498
--
Ticket URL: <https://code.djangoproject.com/ticket/36413>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 23, 2025, 9:38:42 AM5/23/25
to django-...@googlegroups.com
#36413: Add delayed_redirect() shortcut for HTML-based client-side redirection
-------------------------------------+-------------------------------------
Reporter: Mobin Ghaemi | Owner: (none)
Type: New feature | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: shortcuts redirect | Triage Stage:
delay | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* component: Core (Other) => HTTP handling
* resolution: => wontfix
* status: new => closed
* version: 5.1 => dev

Comment:

Hello! Thank you for your report and interest in making Django better.

As you shown in your PR, this is simple to add to your code base, and it
seems a very specific need arising from a niche use case. I don't think
this applies to the broader ecosystem, and Django is a framework designed
to offer robust and accurate solutions for common scenarios.

Given the above, I'll close the ticket accordingly, but if you disagree,
you can consider requesting the new feature idea to be discussed and re-
evaluated following the
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features the documented guidelines for requesting
features].
--
Ticket URL: <https://code.djangoproject.com/ticket/36413#comment:1>

Django

unread,
May 25, 2025, 12:59:53 AM5/25/25
to django-...@googlegroups.com
#36413: Add delayed_redirect() shortcut for HTML-based client-side redirection
-------------------------------------+-------------------------------------
Reporter: Mobin Ghaemi | Owner: (none)
Type: New feature | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: shortcuts redirect | Triage Stage:
delay | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mobin Ghaemi):

Hello,

I opened a topic on the forum and received two pieces of feedback, but
they were not satisfactory.

Since I work at a banking company (Dotin), I understand the importance of
this matter — especially in payment flows where sensitive information is
provided and then possibly returned or reused later.

We’ve been using this module unofficially for quite some time in our
internal systems. Recently, we decided to make it official so we no longer
need to modify the official Django version manually.

Why is this module useful?

After a payment process, users may see certain information on the
following pages.

However, due to the complexity of the purchase process in our country, we
often use shared systems, or users pay someone else to complete the
process on their behalf.

Now imagine someone uses a shared system and views sensitive information.

That confidential data remains visible until the user manually navigates
away from the page — either by clicking a button or through a return
redirect.

Currently, none of these things are enforced automatically. Why?

Because the transition is handled entirely on the frontend. That means the
server doesn’t actually process or control the transition — it’s left to
the frontend, which poses security concerns.

Instead of this fragile, two-sided handling with low security, we believe
Django can handle it properly and securely using a simple module.
Thread number : https://forum.djangoproject.com/t/proposal-add-delayed-
redirect-shortcut-to-simplify-client-side-redirection/41079
--
Ticket URL: <https://code.djangoproject.com/ticket/36413#comment:2>

Django

unread,
May 26, 2025, 10:15:57 AM5/26/25
to django-...@googlegroups.com
#36413: Add delayed_redirect() shortcut for HTML-based client-side redirection
-------------------------------------+-------------------------------------
Reporter: Mobin Ghaemi | Owner: (none)
Type: New feature | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: shortcuts redirect | Triage Stage:
delay | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):

Feedback in the forum shows a consensus against having this helper added
to Django core, so the ticket will remain as `wontfix`. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/36413#comment:3>
Reply all
Reply to author
Forward
0 new messages