[Bug] Django inline include([...]) lists lose the enclosing URL prefix
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Read packages/core/src/repowise/core/ingestion/framework_routes.py around lines 985–1015 and packages/core/src/repowise/core/workspace/extractors/http/django.py around lines 58–79, then inspect the listed cases in tests/unit/workspace/test_framework_routes.py. The issue says to handle nested inline includes at any depth, preserve ^$ as the enclosing prefix, and compose router URLs under their entry prefix; the linked open pull request shows work is already underway.
Written by the indexing model from the issue text.
Description
Summary
An inline include([...]) list in a Django URLconf loses the prefix of the entry that encloses it, and a router mounted with include(router.urls) under a prefix is not composed either.
packages/core/src/repowise/core/ingestion/framework_routes.py:985-1015, packages/core/src/repowise/core/workspace/extractors/http/django.py:58-79
Mechanism
django_includesyields(prefix, module)only when theincludeargument is a dotted module or expression (_DJANGO_INCLUDE_ARG_RE). A list literal is not an include target.django_routesreads every entry in the file flat, so a nested entry gets its own pattern only, andre_path("^$", ...)normalises to empty and is dropped.
Repro
paperless-ngx src/paperless/urls.py: re_path("^api/", include([... re_path("^search/", include([...]))])) gives /autocomplete for /api/search/autocomplete, and /api/profile is missing. 16 of 31 in-repo consumers have no provider. Minimal fixture on main:
urlpatterns = [
re_path("^api/", include([
re_path("^search/", include([re_path("^autocomplete/", views.autocomplete)])),
re_path("^$", views.root),
])),
]
provider http::*::/autocomplete (expected /api/search/autocomplete and /api)
DRF router routes link only through the prefix_stripped fallback because include(api_router.urls) under ^api/ is not composed.
Impact
Django apps that nest URLconfs in one file get providers at the wrong paths.
Done looks like
- Track bracket depth so an inline list inherits the enclosing prefix, at any depth.
- Keep
^$entries as the prefix itself. - Compose
include(<router>.urls)under its entry prefix.
Tests
tests/unit/workspace/test_framework_routes.py: nested include, ^$, router urls.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day