name: djls-domain-conventions description: Use when editing Django template parser tags, validation errors, diagnostics, environment scanning, inspector data, Python environment inventory, or DJLS domain model code. Handles project-specific semantic and parser conventions.
DJLS Domain Conventions
Use this for changes to template parsing, semantic validation, environment scanning, diagnostics, and inspector-derived project data.
Template parser
Node::Tag.bitsexcludes the tag name.- Example:
{% load i18n %}becomesname: "load",bits: ["i18n"]. - Functions processing
bitswork with tag arguments only.
Environment scanning
- External rule/model scan orchestration lives in
crates/djls-db/src/scanning.rs. - Project context, inspector data, and module resolution live in
crates/djls-semantic/src/project/:project.rsdefinesProject.symbols.rsdefinesTemplateLibraries,TemplateLibrary,TemplateSymbol, and inspector response types.resolve.rshandles Python module and model-file discovery.python.rshandles interpreter discovery.
- Static Python extraction lives in
crates/djls-semantic/src/python/.
Validation errors
When adding or removing ValidationError variants, update:
errors.rsdjls-ide/src/diagnostics.rsS-code mapping- test helpers
Use:
rg "ValidationError" crates/ -g '*.rs'
Local runtime state
- Server logs:
~/.cache/djls/djls.log.YYYY-MM-DD - Inspector cache:
~/.cache/djls/inspector/