Django

Code

Ticket #4075 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls.

Reported by: justin.vanwinkle@pythonorific.org Assigned to: adrian
Milestone: Component: Template system
Version: SVN Keywords: url question-mark regex template
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by mtredinnick)

The template tag

{% url example_edit %}

produces

http://localhost:8000/wiki/example/add/?

for the urls.py entry

url(r'^wiki/example/add/?$', example_edit, name="example_edit")

it should produce

http://localhost:8000/wiki/example/add/

since the '?' is a regex operator in this context.

Attachments

Change History

04/18/07 17:00:38 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

I'm pretty sure this is actually a problem with the current core.urlresolvers.reverse - see #2977

04/28/07 12:08:27 changed by mtredinnick

  • description changed.

Fixed summary formatting.

07/05/07 17:51:38 changed by SmileyChris

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

I'll mark as a dupe, #2977 addresses this.

09/09/07 06:33:47 changed by Rafael

  • status changed from closed to reopened.
  • cc set to Excellent, web, site, I, will, be, visiting, ofteno.
  • component changed from Template system to Cache system.
  • summary changed from The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls. to %250D%250A%250D%250A%250D%250A%250D%250A%250D%250A%250D%250AExcellent%2Bweb%2Bsite%2BI%2Bwill%2Bbe%2Bvisiting%2Bofteno.
  • version changed from SVN to unicode.
  • keywords changed from url question-mark regex template to %0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AExcellent+web+site+I+will+be+visiting+ofteno.
  • resolution deleted.
  • stage changed from Accepted to Design decision needed.

%25250D%25250A%25250D%25250A%25250D%25250A%25250D%25250A%25250D%25250A%25250D%25250AExcellent%252Bweb%252Bsite%252BI%252Bwill%252Bbe%252Bvisiting%252Bofteno

09/09/07 08:49:41 changed by russellm

  • status changed from reopened to closed.
  • cc deleted.
  • component changed from Cache system to Template system.
  • summary changed from %250D%250A%250D%250A%250D%250A%250D%250A%250D%250A%250D%250AExcellent%2Bweb%2Bsite%2BI%2Bwill%2Bbe%2Bvisiting%2Bofteno to The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls..
  • version changed from unicode to SVN.
  • keywords changed from %0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AExcellent+web+site+I+will+be+visiting+ofteno to url question-mark regex template.
  • resolution set to fixed.
  • stage changed from Design decision needed to Accepted.

Reverted blog spam


Add/Change #4075 (The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls.)




Change Properties
Action