Django

Code

Ticket #4883 (closed: duplicate)

Opened 1 year ago

Last modified 11 months ago

URL reversing can't reverse URLs with plus sign

Reported by: Alexander Solovyov <alexander.solovyov@gmail.com> Assigned to: adrian
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

I have an URL with plus sign inside it:

url(r'^member/\+new/$', views.member_new, name="member_new")

If I use {% url %} tag, it gives me "/member/\+new/", which is unusable.

Attachments

django-plus-sign-fix.patch (0.6 kB) - added by andresj on 10/23/07 23:30:51.
Fix for the plus sign problem. (Generated with svn diff) It also fixes a similar problem with dots.

Change History

07/15/07 04:34:29 changed by mtredinnick

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to duplicate.
  • needs_tests changed.
  • needs_docs changed.

This will be fixed by #2977, which I'm in the process of reviewing.

10/23/07 23:28:59 changed by andresj

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

I am opening this ticket again because #2977 hasn't been changed in a month and was created a year ago, and it seems that the patch supplied there doesn't work (my decision might be incorrect--this is my first contribution/appearence in this trac site).

I have the same problem as Alexander Solovyov in a website using many plus signs in the URLs.

I am going to attach the fix in a couple of seconds :).

10/23/07 23:30:51 changed by andresj

  • attachment django-plus-sign-fix.patch added.

Fix for the plus sign problem. (Generated with svn diff) It also fixes a similar problem with dots.

(follow-up: ↓ 4 ) 10/23/07 23:31:31 changed by mtredinnick

  • status changed from reopened to closed.
  • resolution set to duplicate.

If we say we're going to close a ticket as part of another fix, then please don't reopen the original. You're welcome to attach your patch for somebody else who might find this in a search, but we're trying to reduce the number of open tickets, not have more semi-duplicates open.

(in reply to: ↑ 3 ; follow-up: ↓ 6 ) 10/23/07 23:33:22 changed by andresj

Replying to mtredinnick:

If we say we're going to close a ticket as part of another fix, then please don't reopen the original. You're welcome to attach your patch for somebody else who might find this in a search, but we're trying to reduce the number of open tickets, not have more semi-duplicates open.

should I attach this patch I just posted to #2977 ?

10/23/07 23:33:33 changed by andresj

  • has_patch set to 1.

(in reply to: ↑ 4 ) 10/23/07 23:44:25 changed by andresj

Replying to andresj:

Replying to mtredinnick:

If we say we're going to close a ticket as part of another fix, then please don't reopen the original. You're welcome to attach your patch for somebody else who might find this in a search, but we're trying to reduce the number of open tickets, not have more semi-duplicates open.

should I attach this patch I just posted to #2977 ?

Well I guess I'll just attach it there... (sorry if I'm too impatient)


Add/Change #4883 (URL reversing can't reverse URLs with plus sign)




Change Properties
Action