Django

Code

Ticket #7345 (closed: fixed)

Opened 6 months ago

Last modified 4 months ago

URLField should append / if no path is specified.

Reported by: jpwatts Assigned to: mtredinnick
Milestone: 1.0 beta Component: Forms
Version: SVN Keywords: newforms urlfield
Cc: joel@joelwatts.com, apollo13 Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The equivalent URLs http://example.com and http://example.com/ are not being normalized to the same value by URLField.

Attachments

urlfield.diff (3.8 kB) - added by jpwatts on 06/01/08 14:15:36.
Patch to normalize path to / if none is specified (includes tests).

Change History

06/01/08 14:15:36 changed by jpwatts

  • attachment urlfield.diff added.

Patch to normalize path to / if none is specified (includes tests).

07/18/08 19:09:00 changed by Simon Greenhill

  • needs_better_patch changed.
  • needs_docs changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • milestone set to 1.0 beta.

07/26/08 00:18:40 changed by mtredinnick

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

(In [8089]) Fixed #7345 -- When normalising the URLField form field, attach a trailing slash when only a host (no path) is given. Thanks, jpwatts.

07/26/08 06:23:58 changed by Honza_Kral

  • status changed from closed to reopened.
  • resolution deleted.

urlparse.urlsplit(value) returns a tuple in python 2.4 urlparse.urlsplit(value)[2] works as supposed to.

I have no access to test on other versions.

07/26/08 10:51:12 changed by mtredinnick

  • owner changed from nobody to mtredinnick.
  • status changed from reopened to new.
  • stage changed from Ready for checkin to Accepted.

07/26/08 11:00:14 changed by anonymous

  • cc changed from joel@joelwatts.com to joel@joelwatts.com, apollo13.

07/26/08 12:08:54 changed by mtredinnick

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

(In [8093]) Fixed #7345 -- In [8089], I'd forgotten that urlparse.urlsplit() didn't return something with attributes until Python 2.5. Thanks, Honza Kral and apollo13.


Add/Change #7345 (URLField should append / if no path is specified.)




Change Properties
Action