{{{#!python
from django.conf.urls import url
url('^faq$', views.faq,
name='faq'),
}}}
to
{{{#!python
from django.urls import path
path('^faq$', views.faq,
name='faq'),
}}}
This doesn't cause any errors (!) but results in, for example,
{{{reverse('faq')}}} returning the (encoded) url {{{/%5Efaq$}}}.
As this is a) likely to be very common during the migration with a high
cost of a true positive, combined with b) the fact that the chance of a
false positive is fairly low, I suggest we add a check for this.
(PR incoming...)
--
Ticket URL: <https://code.djangoproject.com/ticket/28663>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
PR with tests: https://github.com/django/django/pull/9183
--
Ticket URL: <https://code.djangoproject.com/ticket/28663#comment:1>
Comment (by Chris Lamb):
PR updated after review.
--
Ticket URL: <https://code.djangoproject.com/ticket/28663#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28663#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"998c9dd599cd907bb38f440fff13a808571589f8" 998c9dd]:
{{{
#!CommitTicketReference repository=""
revision="998c9dd599cd907bb38f440fff13a808571589f8"
Fixed #28663 -- Add a check for likely incorrectly migrated
django.urls.path() routes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28663#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"518c11352c3adad20b8d4a255369d2b8bd6f61fb" 518c1135]:
{{{
#!CommitTicketReference repository=""
revision="518c11352c3adad20b8d4a255369d2b8bd6f61fb"
[2.0.x] Fixed #28663 -- Add a check for likely incorrectly migrated
django.urls.path() routes.
Backport of 998c9dd599cd907bb38f440fff13a808571589f8 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28663#comment:5>