Opened 3 years ago

Closed 3 weeks ago

#19323 closed New feature (wontfix)

Add django.contrib.redirects setting for turning redirect on/off.

Reported by: Melevir Owned by: Melevir
Component: contrib.redirects Version: master
Severity: Normal Keywords: schemamigration, redirects, is_active
Cc: Melevir, berker.peksag@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

At the moment django.contrib.redirects doesn't allow to disable particular redirect.
To do this I have do remove it completely or rename old_path to nonexistent. It neither clear nor correct.
Good solution is to add is_active bool field with default=True.

Change History (8)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Someday/Maybe
  • Type changed from Uncategorized to New feature

A reasonable idea, but we're hampered by the lack of a built in schema migration system.

Marking it someday/maybe; once we have a built-in migration system, this sort of change will be easy to make, but in the meantime, it's a non-trivial change.

comment:2 Changed 2 years ago by ZeevG

Can I assume this feature can be added now that we do have a built-in migration system?

I'm happy to write a patch, it seems like it might be a good ticket for me to get started with.

comment:3 Changed 2 years ago by ZeevG

  • Keywords schemamigration added

comment:4 Changed 23 months ago by timo

  • Easy pickings unset
  • Version changed from 1.4 to master

@ZeevG, migrations is still under active development and I don't think we're quite ready to add them to contrib apps yet. Stay tuned.

comment:5 Changed 15 months ago by aaugustin

The current plan is to make changes to models in contrib apps in Django 1.8.

comment:6 Changed 7 months ago by timgraham

  • Triage Stage changed from Someday/Maybe to Accepted

We'd need to include a documentation warning that since the default RedirectFallbackMiddleware.response_redirect_class is HttpResponsePermanentRedirect, the flag may have no effect on users who have already accessed the redirect and have it cached by their browser.

comment:7 Changed 3 weeks ago by berkerpeksag

  • Cc berker.peksag@… added

comment:8 Changed 3 weeks ago by timgraham

  • Resolution set to wontfix
  • Status changed from new to closed

Discussion on the pull request with Berker concluded that adding this feature would likely be too confusing due to the default redirect being "permanent".

Note: See TracTickets for help on using tickets.
Back to Top