Update URL patterns to use new path() and re_path().
Review Request #11956 — Created Jan. 21, 2022 and submitted
Django 2+ provides a new method for definings URLs,
path()
. This is
much simpler for basic cases, and makes URL patterns more readable. In
addition, the oldurl()
method has been renamed tore_path()
, and a
warning is raised when using the old name, so switch to that too.
Ran unit tests.
Summary | ID |
---|---|
0bffd78fa1db5fba618a57556aa84c6751228e59 |
Description | From | Last Updated |
---|---|---|
Mind tweaking the summary to be a little more clear on what this does? I went into this thinking the … |
chipx86 | |
W605 invalid escape sequence '\.' |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
Alignment is off. |
chipx86 | |
Alignment is off. |
chipx86 | |
Alignment is off. |
chipx86 | |
Alignment is off. Can we just put the { on the path( line so that we can keep the contents … |
chipx86 | |
This was already here, but the }) alignment is off. |
chipx86 | |
Alignment is off. |
chipx86 | |
Indentation of the subsequent lines are all too far. |
chipx86 | |
django.urls should be last. |
chipx86 |
- Commits:
-
Summary ID 55fef718e66b859d9d62c903202c4d442f855c46 eee12ddc7866436116eb522af848bd1ef7094517 - Diff:
-
Revision 2 (+140 -144)
Checks run (2 succeeded)
-
-
Mind tweaking the summary to be a little more clear on what this does? I went into this thinking the change was going to be something entirely different.
-
-
-
-
Alignment is off.
Can we just put the
{
on thepath(
line so that we can keep the contents nicely indented 4 spaces relative topath(
? I think we may also want to make this akwargs={
? -
-
- Summary:
-
Update URL patterns.Update URL patterns to use new path() and re_path().
- Description:
-
Django 2+ provides a new method for definings URLs,
path()
. This ismuch simpler for basic cases, and makes URL patterns more readable. In addition, the old url()
method has been renamed tore_path()
, and awarning is raised when using the old name, so switch to that too. + + Testing Done:
+ Ran unit tests. - Commits:
-
Summary ID eee12ddc7866436116eb522af848bd1ef7094517 3be9cce18f4d4486e5b562be456ea96d5d768f37 - Diff:
-
Revision 3 (+150 -156)
Checks run (2 succeeded)
- Description:
-
Django 2+ provides a new method for definings URLs,
path()
. This ismuch simpler for basic cases, and makes URL patterns more readable. In addition, the old url()
method has been renamed tore_path()
, and awarning is raised when using the old name, so switch to that too. - - Testing Done:
- Ran unit tests.
- Commits:
-
Summary ID 3be9cce18f4d4486e5b562be456ea96d5d768f37 0bffd78fa1db5fba618a57556aa84c6751228e59 - Diff:
-
Revision 4 (+158 -164)