The Python mapper already recognizes Flask and FastAPI routes, but Django projects are still treated as generic Python source groups even when their URL configuration is explicit in urls.py.
It would be useful for clawpatch to map Django URL patterns as route features when it can do so conservatively.
Proposed scope:
- detect Django
urls.py modules that define module-level urlpatterns
- map literal
path(...), re_path(...), and legacy url(...) declarations
- normalize common Django path converters like
<int:pk> to :pk
- handle simple named regex groups like
(?P<slug>...)
- treat
include("app.urls") as a URL group without recursively expanding imported configs
- avoid false positives from helper lists, comments, strings, docstrings, and local function-only
urlpatterns
This should make Django projects produce more useful review features without executing project code.
The Python mapper already recognizes Flask and FastAPI routes, but Django projects are still treated as generic Python source groups even when their URL configuration is explicit in
urls.py.It would be useful for clawpatch to map Django URL patterns as route features when it can do so conservatively.
Proposed scope:
urls.pymodules that define module-levelurlpatternspath(...),re_path(...), and legacyurl(...)declarations<int:pk>to:pk(?P<slug>...)include("app.urls")as a URL group without recursively expanding imported configsurlpatternsThis should make Django projects produce more useful review features without executing project code.