Opened 19 years ago
Last modified 18 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: | 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 )
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.
I'm pretty sure this is actually a problem with the current
core.urlresolvers.reverse- see #2977