Opened 16 years ago

Closed 16 years ago

#9239 closed (wontfix)

Better reverse() handling for the (.*) pattern

Reported by: Malcolm Tredinnick Owned by: Malcolm Tredinnick
Component: Core (Other) Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Right now, if you have (.*) in a URL pattern, calling reverse() or {% url... %} requires you to pass in an empty string argument. But this is really an optional argument, since it successfully matches nothing. It would be nice if reverse URL resolving understood that case and allowed for no parameter to be passed in.

Change History (7)

comment:1 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: newclosed

Now that I look at the code, this would be unnecessarily fiddly to handle. We currently can completely ignore the contents of capturing groups and having to process them just for a few special cases would be extra work for no huge benefit.

Turns out that (.*)? would work as a pattern if somebody didn't want to have to pass in empty arguments. So wontfix-ing my own ticket, upon reflection.

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: wontfixfixed

(In [9217]) Fixed #9239 -- Somebody read my form validation docs from r9177 and found a
typo in them. I guess that was predictable. Thanks, Berry Groenendijk

comment:3 by Malcolm Tredinnick, 16 years ago

(In [9218]) [1.0.X] Fixed #9239 -- Somebody read my form validation docs from r9180 and
found a typo in them. I guess that was predictable. Thanks, Berry Groenendijk

Backport of r9217 from trunk.

comment:4 by Malcolm Tredinnick, 16 years ago

Above commit messages were typos. They should have referred to bug #9329.

comment:5 by rdakin, 16 years ago

Does that mean this should still be resolved wontfix? The issue is still apparent in my testing.

comment:6 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: closedreopened

Yes, it's still a wontfix.

comment:7 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: reopenedclosed
Note: See TracTickets for help on using tickets.
Back to Top