Skip to content

Add Django urls.py route mapping #53

@rohitjavvadi

Description

@rohitjavvadi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions