Update URL patterns to use new path() and re_path().

Review Request #12022 — Created Jan. 29, 2022 and submitted

david
Review Board
master
reviewboard

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 old url() method has been renamed to re_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 test create_file_attachment_base method to use real
UUIDs instead of the string "test-uuid".

Ran unit tests.

Summary
Update URL patterns to use new path() and re_path().
Description From Last Updated

E231 missing whitespace after ','

reviewbotreviewbot

Second line isn't aligned right.

chipx86chipx86

Alignment isn't correct.

chipx86chipx86

This file's change seems unrelated.

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
david
chipx86
  1. 
      
  2. reviewboard/admin/urls.py (Diff revision 3)
     
     
     

    Second line isn't aligned right.

  3. reviewboard/cmdline/rbext.py (Diff revision 3)
     
     
     
     
     
     
     

    Alignment isn't correct.

  4. reviewboard/testing/testcase.py (Diff revision 3)
     
     
     

    This file's change seems unrelated.

    1. Actually it is part of the change. I changed the file attachment URL to use the uuid converter, which actually parses UUID format. The old "test-uuid" string didn't parse anymore.

  5. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to django-3.2 (a3249c8)
Loading...