Opened 17 years ago

Last modified 17 years ago

#4075 closed

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

Reported by: justin.vanwinkle@… Owned by: Adrian Holovaty
Component: Template system Version: dev
Severity: Keywords: url question-mark regex template
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Malcolm Tredinnick)

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.

Change History (2)

comment:1 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedAccepted

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

comment:2 by Malcolm Tredinnick, 17 years ago

Description: modified (diff)

Fixed summary formatting.

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