System Checks¶
Module Summary¶
next.dj contributes Django system checks for every subsystem.
Run them through uv run python manage.py check and the framework reports configuration mistakes with a code and a hint.
Check Registration¶
next.checks.register_all runs during AppConfig.ready.
It imports each subsystem checks module so the @register side effects take effect.
The imported modules are next.conf.checks, next.pages.checks, next.urls.checks, next.components.checks, next.forms.checks, next.server.checks, and next.static.checks.
Most of these modules register checks. next.server.checks registers no Django system checks.
The dependency injection layer contributes no Django system checks.
Subsystem Checks¶
Pages¶
System checks for the pages subsystem.
- next.pages.checks.check_context_functions(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Require keyless @context callables to return a dict when invoked.
- next.pages.checks.check_context_processor_signature(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Warn when a configured context processor has no request parameter.
- next.pages.checks.check_layout_templates(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Check layout.djx files for the {% block template %} structure.
- next.pages.checks.check_page_functions(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Validate each page module for render or template. Warn when empty.
- next.pages.checks.check_pages_structure(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Check each router’s pages tree for layouts, naming, and structure.
URLs¶
System checks for the URL routing subsystem.
- next.urls.checks.check_duplicate_url_parameters(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Fail when the same bracket parameter name is repeated in one route.
Components¶
System checks for the components subsystem.
- next.components.checks.check_component_py_no_pages_context(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Check that component.py files do not use context from next.pages.
- next.components.checks.check_cross_root_component_name_conflicts(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Reject one component name in the root route scope on more than one page tree.
Forms¶
System checks for the forms subsystem.
- next.forms.checks.check_form_action_backends_configuration(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Validate DEFAULT_FORM_ACTION_BACKENDS shape and import paths.
- next.forms.checks.check_form_action_collisions(*_args: object, **_kwargs: object) list[CheckMessage][source]¶
Flag two @action calls that share a name but come from different handlers.
Re-registration of the same handler (for example during autoreload) is safe and does not trigger the check because the fingerprint stays identical.
- next.forms.checks.clear_action_collisions() None[source]¶
Drop the collision-check state. Intended for test isolation.
- next.forms.checks.record_possible_collision(action_name: str, old_handler: Callable[..., Any], new_handler: Callable[..., Any]) None[source]¶
Record a collision when a name is re-registered with a distinct handler.
Called by RegistryFormActionBackend.register_action only on the overwrite path, so the common first-registration case pays nothing. Identity match (module reload of the exact same object) short-circuits before the fingerprint comparison.
Static¶
System checks for NEXT_FRAMEWORK[‘DEFAULT_STATIC_BACKENDS’].
The checks are hooked into manage.py check via the @register decorator. All identifiers live in the next.* namespace to avoid collisions with Django core checks.
Registered identifiers.
next.W030. Warning raised when DEFAULT_STATIC_BACKENDS is empty. The framework falls back to the built-in staticfiles backend.
next.E036. Error raised when a backend dotted path fails to import.
next.E037. Error raised when the resolved class is not a StaticBackend subclass.
next.E038. Error raised when the same BACKEND entry appears more than once in the configuration list.
next.W031. Warning raised when OPTIONS[‘css_tag’] or OPTIONS[‘js_tag’] does not contain the {url} placeholder.
next.W042. Warning raised when JS_CONTEXT_SERIALIZER is set but does not resolve to a class implementing the JsContextSerializer protocol.
Configuration¶
System checks for the configuration layer.
Server¶
next.server.checks registers no Django system checks, as noted under Check Registration.
Dependency Injection¶
The dependency injection layer does not contribute Django system checks.
There is no next.ENNN code for a missing provider or a bad marker graph.
Note
Expect misconfiguration at runtime: unresolved parameters become None, and cycles raise DependencyCycleError.
Troubleshooting lives in Dependency Injection and Troubleshooting.
Check Code Reference¶
The codes follow the Django convention next.X<NN> where X is E for errors and W for warnings.
Errors¶
Code |
Condition |
Emitted by |
|---|---|---|
|
|
|
|
A |
|
|
A page backend entry does not specify |
|
|
A page backend entry names an unknown backend. |
|
|
The file router |
|
|
The file router |
|
|
The router manager fails to initialize. |
|
|
A |
|
|
A |
|
|
A parameter directory is missing its |
|
|
An error was raised while checking page functions. |
|
|
A |
|
|
A page |
|
|
An error was raised while checking URL conflicts. |
|
|
The same URL pattern is defined in more than one location. |
|
|
An error was raised while collecting patterns from a router. |
|
|
|
|
|
A component name is registered more than once within the same scope. |
|
|
A |
|
|
|
|
|
|
|
|
A file router entry is missing |
|
|
A file router entry is missing |
|
|
A file router entry is missing |
|
|
A |
|
|
A route repeats the same bracket parameter name. |
|
|
A keyless |
|
|
An error was raised while checking router pages. |
|
|
A component backend entry is missing a required key. |
|
|
A component backend |
|
|
|
|
|
A component name uses the shared root namespace on more than one page tree. |
|
|
A configuration dict has unknown keys. |
|
|
A static backend dotted path fails to import. |
|
|
A static backend entry is not a dict, or the class is not a |
|
|
|
|
|
A configured context processor does not accept a |
|
|
A form action name is registered by more than one handler. |
|
|
A |
|
|
A |
|
|
A form action backend entry has the wrong shape or cannot be imported. |
|
|
A form action backend class does not subclass |
|
A code emitted by next.checks.common is produced by a shared helper that the listed subsystem check modules call.
Warnings¶
Code |
Condition |
Emitted by |
|---|---|---|
|
A |
|
|
|
|
|
An |
|
|
|
|
|
A |
|
Note
Codes are assigned per check and are not contiguous. Inspect the source of each subsystem module above for the exact message text and trigger conditions.
See Also¶
See also
Installation for the first manage.py check run.
Troubleshooting for symptoms that map to individual next.* codes.