Opened 18 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 Initial Version
Reported by: | 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
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.
Note:
See TracTickets
for help on using tickets.