Django

Code

Ticket #634 (closed: fixed)

Opened 4 years ago

Last modified 3 years ago

[patch] admin shortcuts don't honor existing http:// absolute urls

Reported by: hugo Assigned to: adrian
Milestone: Component: django.contrib.admin
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

When you have objects in your model that return serverabsolute urls with leading http://, they aren't honored by the current r/ shortcut view - it still prepends the site. The attached patch honors those URLs and if it starts with http:// (should maybe extended to https://, too?), it just returns the URL without attaching some site stuff.

I use a http:// carrying URL in one of my models where objects in the database return a get_<field>_url() result as their absolute url, because they are just media files listed in the database.

Attachments

shortcut-fix.diff (1.1 kB) - added by hugo on 10/17/05 07:53:22.
fixes admin shortcuts to honor leading http://

Change History

10/17/05 07:53:22 changed by hugo

  • attachment shortcut-fix.diff added.

fixes admin shortcuts to honor leading http://

10/17/05 07:58:59 changed by hugo

  • summary changed from admin shortcuts don't honor existing http:// absolute urls to [patch] admin shortcuts don't honor existing http:// absolute urls.

10/17/05 08:24:30 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [903]) Fixed #634 -- Changed shortcut view to accept get_absolute_url()s that return URLs starting with http. Thanks, Hugo


Add/Change #634 ([patch] admin shortcuts don't honor existing http:// absolute urls)




Change Properties
Action