Update URL patterns to use new path() and re_path().
Review Request #12022 — Created Jan. 29, 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.As part of this, I changed the file attachment URLs to actually parse
UUIDs using Django's new converter for that. This required making a
change in the testcreate_file_attachment_base
method to use real
UUIDs instead of the string "test-uuid".
Ran unit tests.
- Commits:
-
Summary ID 55648844e02dd49a8cd706501070af855b674c36 987a2e1be61ef4ebbd46265129ccdd625e113665 - Diff:
-
Revision 2 (+688 -690)
Checks run (2 succeeded)
- Change Summary:
-
Indentation in docs.
- Commits:
-
Summary ID 987a2e1be61ef4ebbd46265129ccdd625e113665 1b5ce6ea5a19776a61d70cef708b2dd708b685ec - Diff:
-
Revision 3 (+698 -700)
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. + + As part of this, I changed the file attachment URLs to actually parse
+ UUIDs using Django's new converter for that. This required making a + change in the test create_file_attachment_base
method to use real+ UUIDs instead of the string "test-uuid". - Commits:
-
Summary ID 1b5ce6ea5a19776a61d70cef708b2dd708b685ec 986690fae4a4de27c24130076e64cf251fe64447 - Diff:
-
Revision 4 (+716 -716)