Skip to content

core.utils ​

Overview ​

Shared utilities for template rendering, system user lookup, and fake requests and views.

Classes ​

get_system_user ​

Return the user with is_system=True. Workflow transitions fall back to this user when no acting user is known.

Raises DoesNotExist when no system user exists.

Signature ​

get_system_user()

Returns ​

User

Source ​

server/vueda/core/utils.py:23

implemented_builtin_actions ​

The built-in CRUD actions viewset (a class or an instance) implements, in BUILTIN_ACTIONS order.

Uses the test DRF's router applies when it routes a viewset (hasattr(viewset, action)), so action discovery offers exactly the built-in actions that have a route. A VuedaReadOnlyViewSet yields list and retrieve only.

Signature ​

implemented_builtin_actions(viewset)

Parameters ​

NameTypeRequiredDefaultDescription
viewsetyes

Returns ​

tuple[str, ...]

Source ​

server/vueda/core/utils.py:39

render_template ​

Replace tags in the body with their corresponding values from the tags dictionary.

Signature ​

render_template(text, tags)

Parameters ​

NameTypeRequiredDefaultDescription
textstryes
tagsdictyes

Returns ​

str

Source ​

server/vueda/core/utils.py:51

Source ​

server/vueda/core/utils.py