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
--
Ticket URL: <https://code.djangoproject.com/ticket/21137>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"222460a994072dfae9d5ac6b22a2afb116f64b2a"]:
{{{
#!CommitTicketReference repository=""
revision="222460a994072dfae9d5ac6b22a2afb116f64b2a"
Fixed #21137 -- Documented best practice for URLconfs with repeated
pattern prefixes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:1>
Comment (by Tim Graham <timograham@…>):
In [changeset:"61b685847e63e94d678988d6c7a8a7477b37275d"]:
{{{
#!CommitTicketReference repository=""
revision="61b685847e63e94d678988d6c7a8a7477b37275d"
[1.5.x] Fixed #21137 -- Documented best practice for URLconfs with
repeated pattern prefixes.
Backport of 222460a994 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"bb8a08794941ebc4fa5b575bf5dadad92d637dbe"]:
{{{
#!CommitTicketReference repository=""
revision="bb8a08794941ebc4fa5b575bf5dadad92d637dbe"
[1.6.x] Fixed #21137 -- Documented best practice for URLconfs with
repeated pattern prefixes.
Backport of 222460a994 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:3>
* status: closed => new
* needs_better_patch: => 0
* resolution: fixed =>
* needs_tests: => 0
* needs_docs: => 0
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"77f6b468e5b3a389b3e56e1e1f70a56e8a0a68fa"]:
{{{
#!CommitTicketReference repository=""
revision="77f6b468e5b3a389b3e56e1e1f70a56e8a0a68fa"
Fixed #21137 -- Corrected ULRconf include example.
Thanks marfire for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"de8715ca9749c182b3610ea3d1959c3a5603a919"]:
{{{
#!CommitTicketReference repository=""
revision="de8715ca9749c182b3610ea3d1959c3a5603a919"
[1.5.x] Fixed #21137 -- Corrected ULRconf include example.
Thanks marfire for the report.
Backport of 77f6b468e5 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"d30d66b90728b8dc173c050c63c86e5af3ab7c40"]:
{{{
#!CommitTicketReference repository=""
revision="d30d66b90728b8dc173c050c63c86e5af3ab7c40"
[1.6.x] Fixed #21137 -- Corrected ULRconf include example.
Thanks marfire for the report.
Backport of 77f6b468e5 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21137#comment:7>