Glossary#
Terms used throughout the next.dj documentation.
- action#
A registered entry point for a form POST. Form classes register automatically through
__init_subclass__with asnake_casename derived from the class name. Form-less functions register through@action("name"). The framework derives a stable dispatch URL from the action name.- asset#
A file registered with the static pipeline. Has a stem, an extension, and an owner (page, layout, or component).
- asset kind#
A combination of extension and renderer that decides how an asset becomes HTML. Bundled kinds are
css,js, andmodule.- backend#
A subsystem implementation registered through
NEXT_FRAMEWORK. Used for the router, the components backend, the static backend chain, and the form action chain.- collector#
The request scoped object that accumulates assets touched by the current render.
- collector slot#
A named collection inside the static collector.
{% collect_styles %}emits thestylesslot,{% collect_scripts %}emits thescriptsslot.- component#
A reusable template fragment under the components root. Has a template and optional Python module.
- ComponentWidget#
A form widget that renders a field through a registered next.dj component instead of a Django widget template. One field maps to one component, and the component owns the markup.
- context function#
A Python callable decorated with
@context("key")that publishes a value to the template scope.- DI marker#
A typed annotation or default-value object that asks the resolver for a specific source of data. An annotation marker is written in the type position, for example
param: DUrl[int], and coversDUrl,DQuery, andDForm. A default-value marker is written as the parameter default, for exampleparam: str = Context(), and coversContextandDepends.- discovery#
The filesystem walk that builds the asset registry, the components registry, and the page registry at startup.
- dispatch#
The pipeline that turns a form submission into a handler invocation. A failed validation skips the handler and re-renders the origin page instead.
- dynamic permission hook#
A per-request access check declared on a form,
check_permissionsfor the view level andhas_object_permissionfor the bound instance. Both resolve through the dependency injector and returnPermissionOutcome, thebool | HttpResponse | Nonealias. They run as an additive layer after the static guard. See Dynamic permission hooks.- form wizard backend#
The draft-persistence contract for a
FormWizard, aFormWizardBackendsubclass that stores each step’s cleaned data between requests. Selected throughNEXT_FRAMEWORK["FORM_WIZARD_BACKEND"], with the bundledSessionFormWizardBackendas the default andCacheFormWizardBackendas the cache-backed alternative.- FormSpec#
A frozen dataclass that describes a form layout. Used to render forms in custom templates.
- FormWizard#
A multi-step form that routes a sequence of step forms across requests. Steps are declared as
(name, FormClass)tuples inMeta.steps, anddoneruns after the final step validates.- framework island#
A Vue or React root mounted into one element of an otherwise server-rendered page. An adapter mounts it through
Next.partial.onMountor thenext:mountedevent and unmounts it onnext:removed, so a partial update never leaks its listeners. See Framework islands.- guard#
The access requirement declared on an action through
Meta.login_requiredandMeta.permission_required, or the matching@actionkeywords. Stored as anActionGuardon the registry metadata and enforced before the form is built. See Access guards.- inherit_context#
The
inherit_context=Trueflag on@contextinpage.py. Publishes the context value to every descendant page under that directory, not only to the page that declares it.- JS context policy#
Algorithm class that resolves duplicate serialised keys for
window.Next.context, distinct from the JS context serializer that encodes the values. Selected throughJS_CONTEXT_POLICYinside static backendOPTIONS, see JavaScript context.- JS context serializer#
Implementations of
next.static.JsContextSerializerthat encode values forwindow.Next.context, distinct from the JS context policy that resolves duplicate keys. Distinct from frozen form specs innext.forms.serializers.- layer#
A server-initiated overlay stacked above the current page, opened by the
layer.openpatch verb or adata-next-layerlink. The client runtime hosts each layer in its own<dialog>element and closes the top layer on accept, dismissal, or Back.- layout#
A
layout.djxfile in an ancestor directory. Wraps every descendant page.- manager#
The singleton orchestrator for one subsystem. Examples include
page,components_manager,router_manager,form_action_manager.- morph#
The default patch verb. Reconciles the target element in place instead of replacing it, and
data-next-keylets it reuse the node a keyed child already owns.- multi-project layout#
Multiple Django applications or explicit
DIRSentries each contributing page trees while optionally sharing component directories throughCOMPONENT_BACKENDS. See Multi-project setup.- NextScriptBuilder#
Constructs the
next.min.jstag, preload link, andNext._initshell. Controlled throughNEXT_FRAMEWORK["NEXT_JS_OPTIONS"].- origin page#
The page that rendered a form. Identified at dispatch time by resolving the hidden
_next_form_originURL path against the URLconf.- outcome#
The
ActionOutcomedataclass a form action backend produces from a dispatch, shaped into the HTTP response byshape_response. See Action backends.- page#
A directory under the page root with a
page.py, or a virtual route with only atemplate.djx.- page root#
A directory that the router walks for page discovery. Comes from
APP_DIRSandDIRSinPAGE_BACKENDS.- partial request#
A request the client runtime marks with the
X-Next-Requestheader.is_partial_requestdetects it on the server, so a handler can answer with a patch envelope instead of a redirect.- patch#
One addressed DOM operation inside a patch envelope. Carries a verb such as
morphorremove, a target selector, and optional HTML.- patch envelope#
The wire object of a partial response. Carries the asset version, the ordered patch ops, the co-located assets of the rendered targets, and the machine-readable form meta.
- provider#
A class that produces a value for a parameter. Implements
can_handleandresolve.- re-render#
The dispatch path that re-renders the origin page after a failed form validation.
- request cache#
The dependency cache that lives on the request between context functions, components, and form re-render.
- resolver#
The singleton
DependencyResolverthat fills parameters from providers.- route name#
The Django URL name string inside the
nextnamespace (app_nameonnext.urls). Values come fromNEXT_FRAMEWORK["URL_NAME_TEMPLATE"], default"page_{name}", where{name}is derived from the normalized filesystem path. Reverse from templates as{% url 'next:page_notes_id' id=note.id %}or from Python through URL reversing.- scope#
The keying rule for an action name,
pageorshared. A page-scoped action is keyed to the absolute path of its declaringpage.pyorcomponent.py, while a shared action is keyed to its dotted module name and is reachable project-wide. The resulting key is the scope key that the UID hashes together with the action name. See Actions.- ScriptInjectionPolicy#
Controls whether the framework injects the runtime bundle automatically (
AUTO), skips injection (DISABLED), or leaves placement to your templates (MANUAL).- signal#
A Django signal emitted by one subsystem. Subscribers react without subclassing.
- slot#
A named area inside a component template filled with caller content through the block form of
{% component %}.- stem#
The filename without the extension. The recognised stem is
componentfor a component file,layoutfor a layout file, andtemplatefor a page template file. There is nopagestem.- strategy#
A swappable algorithm such as
DedupStrategyfor static deduplication.- template loader#
A
TemplateLoadersubclass registered throughNEXT_FRAMEWORK["TEMPLATE_LOADERS"]that supplies template text for apage.pypath. See Add a custom template loader.- UID#
The 16 character hash of an action’s scope key and name that becomes part of the dispatch URL.
- virtual route#
A directory with only
template.djxand nopage.py. No Python module is invoked for the route itself, but ancestorlayout.djxfiles still wrap it and co-located static assets are still collected.- zone#
A named slice of a page template wrapped in
{% zone %}. The server re-renders the slice standalone, and patches address it by its name.
See also#
See also
Overview for the introductory mental model. Internals overview for the subsystem map.