From 9383fae0d55a553be3bda620db87fa9ee8a81478 Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Mon, 18 May 2026 10:49:34 -0700 Subject: Fixed #28800 -- Added a listurls management command. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks JaeHyuck Sa, Jacob Walls, and Tim McCurrach for reviews. Co-authored-by: Ülgen Sarıkavak --- docs/ref/django-admin.txt | 25 +++++++++++++++++++++++++ docs/releases/6.2.txt | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index adbd2465a7..fc8de971ec 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -499,6 +499,31 @@ Only support for PostgreSQL is implemented. If this option is provided, models are also created for database views. +``listurls`` +------------ + +.. django-admin:: listurls + +.. versionadded:: 6.2 + +List URL patterns from the project's root :doc:`URLconf ` +with optional filtering by prefixes, inspired by ``show_urls`` from +``django-extensions``. + +.. django-admin-option:: --unsorted, -u + +Lists URLs in the original ordering from ``urlpatterns``. The default ordering +is alphabetical by route. + +.. django-admin-option:: --prefix, -p [prefix ...] + +Filters URLs by given prefixes. + +.. django-admin-option:: --format, -f {tabular,stacked,json} + +Specifies the output format. Available values are ``tabular``, ``stacked``, and +``json``. Default is ``tabular``. + ``loaddata`` ------------ diff --git a/docs/releases/6.2.txt b/docs/releases/6.2.txt index 3bafa4f583..f88beb6fa0 100644 --- a/docs/releases/6.2.txt +++ b/docs/releases/6.2.txt @@ -173,7 +173,8 @@ Logging Management Commands ~~~~~~~~~~~~~~~~~~~ -* ... +* The new :djadmin:`listurls` command lists the URLs from the project's root + URLconf, including the view class or function (and name, if present). Migrations ~~~~~~~~~~ -- cgit v1.3