Skip to content

Fix URL path duplication when mounting at custom path#71

Merged
7tg merged 1 commit intomainfrom
fix/68-url-path-duplication
Feb 8, 2026
Merged

Fix URL path duplication when mounting at custom path#71
7tg merged 1 commit intomainfrom
fix/68-url-path-duplication

Conversation

@7tg
Copy link
Owner

@7tg 7tg commented Feb 8, 2026

Summary

  • Remove internal mcp/ prefix from django_admin_mcp/urls.py so users fully control the mount point, following standard Django URL conventions
  • Previously, path("mcp/", include("django_admin_mcp.urls")) produced /mcp/mcp/ instead of /mcp/
  • Add URL pattern tests to prevent regression

Closes #68

Test plan

  • New test_url_patterns.py verifies no path duplication via reverse() and resolve()
  • All 382 tests pass (378 existing + 4 new)
  • Ruff lint clean
  • Pre-commit hooks pass

Remove internal `mcp/` prefix from urls.py so users control the mount
point entirely, following standard Django URL conventions.
@7tg 7tg merged commit 31eca87 into main Feb 8, 2026
16 checks passed
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

URL path duplication when mounting at custom path

1 participant