Skip to content

core.checks ​

Overview ​

System checks validating VUEDA serializer configuration, model feature policy, and cache setup.

check_exclude_fields_serializer_usage ​

Report ExcludeFieldsSerializerMixin serializers used as a nested field or an expandable_fields entry (vueda_core.E007, E008), or as the serializer_class of a routed DRF view that is not a ViewSet (vueda_core.E021).

ExcludeFieldsSerializerMixin.get_extra_kwargs() picks its exclusions from the action of the view in the serializer's context. A nested serializer shares its root serializer's context, so a nested copy of the mixin would apply its exclusions for the parent view's action. That behavior is not supported, so these uses are rejected. Only a ViewSet has an action, so the mixin raises ImproperlyConfigured whenever any other DRF view builds its fields. A serializer registered with register_serializer() is not reported for having no ViewSet of its own. Without a view in context, the mixin excludes no fields.

Signature ​

check_exclude_fields_serializer_usage(app_configs, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
app_configsyes
kwargsno

Source ​

server/vueda/core/checks.py:305

check_expandable_fields_configuration ​

Validate every Meta.expandable_fields entry in the discovered serializer graph.

Each entry must have a valid shape and resolve to a serializer or field class. Its name must not be related or calculated, because the VUEDA client reads a path that starts with either name from the row's related or calculated object.

Signature ​

check_expandable_fields_configuration(app_configs, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
app_configsyes
kwargsno

Source ​

server/vueda/core/checks.py:287

check_model_feature_declaration ​

Validate one model's class Vueda declaration and its resolved values.

Signature ​

check_model_feature_declaration(model)

Parameters ​

NameTypeRequiredDefaultDescription
modelyes

Source ​

server/vueda/core/checks.py:396

check_model_feature_policy ​

Report every fault in the class Vueda feature policy of the installed models.

Resolution itself never raises, so an unknown section, an unknown option, an invalid value, a section whose feature app is absent, or a declaration on a proxy surfaces here rather than as an import error while Django loads models.

Signature ​

check_model_feature_policy(app_configs, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
app_configsyes
kwargsno

Source ​

server/vueda/core/checks.py:421

check_permission_names_mapping ​

Report a PERMISSION_NAMES_MAPPING whose codenames ObjectPermissions does not check.

The mapping names the codenames Django writes when it creates permission rows. The ObjectPermissions codenames follow it in two cases only: the default mapping, and the full mapping to Django's own names, which vueda.core.patch_django rewrites ObjectPermissions.perms_map for at import. Any other mapping creates rows that the viewsets never check, so a grant of the renamed permission has no effect. A mapping to Django's names that leaves out list also splits a list between two codenames: the viewset checks view_, and row-level list filtering checks list_.

Signature ​

check_permission_names_mapping(app_configs, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
app_configsyes
kwargsno

Source ​

server/vueda/core/checks.py:492

check_session_cache_is_shared ​

Report sessions stored in a cache that worker processes cannot share.

get_defaults requires CACHE_URL, so the backend is a deliberate choice rather than a silent default. locmem:// and dummy:// still satisfy that key. Behind more than one worker process, a session written by one worker is missing from the next request another serves, and the user loses the session at an unpredictable point.

Only django.contrib.sessions.backends.cache is reported. cached_db writes through to the database, so a per-process cache costs it reads rather than sessions.

This is a deploy check, and it returns early while DEBUG is on, because a single-process development server shares its cache with itself.

Signature ​

check_session_cache_is_shared(app_configs, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
app_configsyes
kwargsno

Source ​

server/vueda/core/checks.py:448

Source ​

server/vueda/core/checks.py