Skip to content

Fixed #30515 -- Added documentation for resolve_url() shortcut.#20441

Merged
nessita merged 2 commits intodjango:mainfrom
duane9:ticket_30515
Dec 26, 2025
Merged

Fixed #30515 -- Added documentation for resolve_url() shortcut.#20441
nessita merged 2 commits intodjango:mainfrom
duane9:ticket_30515

Conversation

@duane9
Copy link
Copy Markdown
Contributor

@duane9 duane9 commented Dec 21, 2025

Trac ticket number

ticket-30515

Branch description

Added comprehensive documentation for the resolve_url() function in the shortcuts reference guide. The documentation covers all argument types (models, view names, and URLs) with examples demonstrating each use case.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

@duane9 duane9 force-pushed the ticket_30515 branch 3 times, most recently from 0372c60 to 256b704 Compare December 23, 2025 06:00
Copy link
Copy Markdown
Contributor

@nessita nessita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @duane9 for working on this ticket! 🌟

I've pushed some minor changes to the proposed docs. I see that you followed the redirect docs closely, which is a smart approach. I took the opportunity to improve some wording and adapting the examples a bit trying to make a stronger case for when using resolve_url instead of redirect.

I also added a second commit with some extra tests for resolve_url since I noticed it support view callables on top of view names.

@github-actions
Copy link
Copy Markdown

📊 Coverage Report for Changed Files

-------------
Diff Coverage
Diff: origin/main...HEAD, staged and unstaged changes
-------------
No lines with coverage information in this diff.
-------------


Note: Missing lines are warnings only. Some lines may not be covered by SQLite tests as they are database-specific.

For more information about code coverage on pull requests, see the contributing documentation.

@nessita nessita merged commit 6c2780f into django:main Dec 26, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants