Django ORM analysis

django-lsp

Autocomplete that follows your models and diagnostics that catch repeated relation queries, without importing Django or running your project.

Get Started
Features

Why django-lsp?

01

Static by design

Indexes Python source without initializing Django, connecting to a database, or executing project code.

02

Relation aware

Traverses forward, reverse, many-to-many, and configured user-model relationships.

03

Editor friendly

Completes ORM expressions and warns about repeated relation queries alongside your general-purpose Python tools.

04

Incremental by default

Uses Salsa to recompute only the affected analysis queries, so completions and diagnostics stay fresh while you type.

Follow your models as you type

This editor view is generated from the real language server and the checked-in Django fixture, so the documentation changes whenever completion behavior changes.

from .models import Blog
Blog.objects.filter(
title__
)
  • title__exact
  • title__iexact
  • title__icontains
  • title__contains
  • title__startswith
  • title__istartswith
  • title__endswith
  • title__iendswith

6 more results

Ready to start?

Get up and running in minutes. Check out our documentation to learn more.

Read the Docs