#21137 closed Cleanup/optimization (fixed)
Documentation example of how to use include and pattern lists to refactor urlconfs with repeated path prefixes
Reported by: | debo | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This was motivated by this gist by David Wolever: https://gist.github.com/wolever/6603290#file-nested_urls-py
I've seen this antipattern in enough projects now that I thought it might be nice to explicitly call it out in the docs.
I've made the doc edit in this branch: https://github.com/MichaelDiBernardo/django/tree/add_urlconf_refactoring_example
Change History (7)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
See comments on https://github.com/django/django/commit/222460a994072dfae9d5ac6b22a2afb116f64b2a
I think the committed code has an error - the first argument to patterns
should be on the second call.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In 222460a994072dfae9d5ac6b22a2afb116f64b2a: