API reference#

Module by module reference for the next.dj public API. Each page lists the public surface plus configuration and signal entries that belong to the subsystem.

Top-level API

The next package itself exports five curated names, the ones that page modules, component modules, and form handlers use most often. Import them from the package root with from next import Depends, action, component, context, page.

next.page

The page manager that owns template registration and rendering, re-exported from Pages reference.

next.context

The page context decorator, re-exported from Pages reference and documented in Decorators and markers.

next.component

The component context manager behind @component.context, re-exported from Components reference.

next.action

The form action decorator, re-exported from Forms reference.

next.Depends

The dependency marker for injected values, re-exported from Dependency injection reference.

next.VERSION

The framework version string, the sixth and only eager name in next.__all__.

Each of the five resolves from its owning subpackage on first attribute access, so import next on its own pulls in no Django module. Anything outside the five stays a deep import, such as from next.urls import DUrl or from next.forms import Form. The subsystem pages below are the reference for that wider surface.

Warning

next.page and next.pages differ by one letter and name different things. next.page is the manager object re-exported at the package root, while next.pages is the subpackage that owns it together with the rest of the pages API.

Note

The curated context is the decorator, not the Context and ContextResult classes that share the word. Those classes belong to the same subpackage and stay behind from next.pages import Context, ContextResult.

The laziness covers the package root, not the subsystems it fronts. Reading Depends imports next.deps, which pulls in a small set of modules from django.dispatch and django.utils. Reading page, context, component, or action loads a much larger part of Django.

Subsystems

Pages reference

next.pages for page modules, layouts, context, and template loaders.

Components reference

next.components for component discovery and rendering.

URLs reference

next.urls for the file router, URL reverse helpers, and dispatcher.

Forms reference

next.forms for form actions, dispatch, formsets, and frozen specs.

Static reference

next.static for the static collector, asset kinds, and backends.

next.partial API reference

next.partial for the patch builder, zones, SSE streams, and the protocol backend.

Dependency injection reference

next.deps for the dependency resolver and providers.

Configuration reference

next.conf for settings loading and the extend_default_backend helper.

Server reference

next.server for the autoreload watcher.

Signals reference

next.signals aggregator that re-exports every framework signal.

Testing reference

next.testing for the test client, signal recorder, and isolation helpers.

Apps reference

next.apps for the Django application configuration.

Utils reference

next.utils for small helpers that the framework uses internally.

Backends reference

next.backends for the shared loading of settings-driven backend families.

Configuration

Settings

Every NEXT_FRAMEWORK key with defaults.

System checks

Django system checks that the framework contributes.

Templates and decorators

Template tags

Every template tag registered by next.dj.

Decorators and markers

Every public decorator and dependency marker.