Opened 10 years ago

Closed 7 years ago

#2112 closed enhancement (wontfix)

[patch] Add the reverse of PREPEND_WWW, which strips leading "www."

Reported by: pa-ching Owned by: Adrian Holovaty
Component: Core (Other) Version: master
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I actually wanted the exact reverse functionality given by PREPEND_WWW, so I made this tiny addition. Just a nit-picky thing, not very important.

Attachments (2)

strip_www.diff (1.3 KB) - added by pa-ching 10 years ago.
strip_www2.diff (1.3 KB) - added by pa-ching 10 years ago.
My mistake! Fixed a little error.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by pa-ching

Attachment: strip_www.diff added

Changed 10 years ago by pa-ching

Attachment: strip_www2.diff added

My mistake! Fixed a little error.

comment:1 Changed 10 years ago by Adrian Holovaty

Resolution: wontfix
Status: newclosed

This is a bit too much of a special case, so I don't think it should go in Django proper. But you can just use your own custom middleware to do it.

comment:2 Changed 7 years ago by Anogar

Resolution: wontfix
Status: closedreopened

I think this should be revisited. This simply rounds out the functionality of the Common middleware's ability to perform very basic redirects. More and more people are going by simply "domain.com" instead of "www.domain.com", and providing a simple method in the core middleware alongside the PREPEND_WWW method makes a lot of sense.

comment:3 Changed 7 years ago by Russell Keith-Magee

Resolution: wontfix
Status: reopenedclosed

If you disagree with a decision that has been made, you should start a discussion on django-developers.

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