This is the moat feature identified in competitor analysis: no shipped Django extension does ORM query autocomplete well.
Goal: when the user types inside Post.objects.filter(...), complete field names based on the parsed model index, and resolve lookups like author__name through FK edges.
Design sketch:
- Detect
.filter( / .exclude( / .annotate( call inside a Python file via lightweight regex or textDocument context.
- Resolve the QuerySet's base model from the assignment chain (best-effort).
- Suggest field names +
__lookup traversal from the parsed WorkspaceIndex.
- Warn on typos with a diagnostic.
Prior art: the archived django-intellisense extension had a partial implementation worth studying.
Bigger feature — likely v0.5+. Design discussion welcome on Discussions first.
This is the moat feature identified in competitor analysis: no shipped Django extension does ORM query autocomplete well.
Goal: when the user types inside
Post.objects.filter(...), complete field names based on the parsed model index, and resolve lookups likeauthor__namethrough FK edges.Design sketch:
.filter(/.exclude(/.annotate(call inside a Python file via lightweight regex or textDocument context.__lookuptraversal from the parsedWorkspaceIndex.Prior art: the archived
django-intellisenseextension had a partial implementation worth studying.Bigger feature — likely v0.5+. Design discussion welcome on Discussions first.