django.core.urlresolvers.reverse fails sometimes.
|Reported by:||sebastian_noack||Owned by:||mtredinnick|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
Description (last modified by mtredinnick)
If you have a url pattern, containing...
- nested groups
- not-matching groups
- look-ahead or look-behind groups
...django.core.urlresolvers.reverse will fail, because of following reasons:
- To replace the groups re.sub with r'\(([^)]+)\)' is used, which matches only until the first ')', doesn't matter how much groups are nested.
- All groups which are no named groups are assumed to be positional groups, regardless if they might be not-matching, look-ahead or look-behind groups.
Change History (5)
Changed 7 years ago by sebastian_noack
comment:1 Changed 7 years ago by mtredinnick
- Description modified (diff)
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to mtredinnick
- Patch needs improvement set
- Summary changed from [PATCH] django.core.urlresolvers.reverse fails sometimes. to django.core.urlresolvers.reverse fails sometimes.
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 7 years ago by sebastian_noack
- Component changed from HTTP handling to Core framework