utils/constants
Overview
Application-wide constants for cookie names, query-string parameters, and internal CRUD identifiers.
Properties
ALL_PAGES
Sentinel page-size value meaning "load every page at once" rather than a fixed number of rows. Selected from the rows-per-page control; drives the all-pages fetch path instead of sending a ps query param.
Type: "all"
Source: client/lib/utils/constants.js:72
CSRF_COOKIE_NAME
Name of the CSRF cookie, usually injected by the backend into a meta tag or cookie. Used by getCSRFToken() for safe POST/PUT/PATCH/DELETE requests.
Type: any
Source: client/lib/utils/constants.js:10
DEFAULT_PAGE_SIZE
Default rows-per-page used when no preference is stored and no override is given.
Type: 25
Source: client/lib/utils/constants.js:75
DEFAULT_PAGE_SIZE_OPTIONS
Default rows-per-page option list offered by the pagination footer (last entry loads all pages).
Type: string | number[]
Source: client/lib/utils/constants.js:78
DETAIL_VIEW_CRUD_NAME
Internal CRUD identifier used to match detail view requests.
Type: "actionrouter.detailview"
Source: client/lib/utils/constants.js:83
EXPAND_PARAM
Query string param used to specify related objects to expand (embed) in the response. e.g., ?e=owner,category
Type: "e"
Source: client/lib/utils/constants.js:34
FIELDS_PARAM
Query string param used to specify which fields should be included in object/list responses. e.g., ?f=id,name
Type: "f"
Source: client/lib/utils/constants.js:28
LIST_VIEW_CRUD_NAME
Internal CRUD identifier used to match list view requests.
Type: "actionrouter.listview"
Source: client/lib/utils/constants.js:88
NON_FIELD_ERRORS_KEY
Standard key used by Django REST Framework for non-field form errors. Used in FormValidationError parsing and form error display.
Type: "non_field_errors"
Source: client/lib/utils/constants.js:22
OMIT_PARAM
Query string param used to omit specific fields from the response. Used for optimization in large object structures. e.g., ?om=metadata,history
Type: "om"
Source: client/lib/utils/constants.js:41
ORDERING_PARAM
Query string param for ordering results in a list view. e.g., ?o=-created_at,name
Type: "o"
Source: client/lib/utils/constants.js:47
PAGE_PARAM
Query string param used to control the page number for paginated list views. e.g., ?p=3
Type: "p"
Source: client/lib/utils/constants.js:59
PAGE_SIZE_PARAM
Query string param used to specify how many items should be returned per page. e.g., ?ps=50
Type: "ps"
Source: client/lib/utils/constants.js:65
SEARCH_PARAM
Query string param used to apply a backend-side search filter. e.g., ?s=widget
Type: "s"
Source: client/lib/utils/constants.js:53
SIDEBAR_COOKIE_MAX_AGE
Max-age in seconds for the sidebar state cookie. Defaults to 7 days.
Type: number
Source: client/lib/utils/constants.js:104
SIDEBAR_COOKIE_NAME
Name of the cookie used to persist the sidebar open/collapsed state across page loads. Read by SidebarProvider on mount to restore previous state.
Type: "sidebar_state"
Source: client/lib/utils/constants.js:99
SIDEBAR_KEYBOARD_SHORTCUT
Keyboard shortcut key that, combined with Ctrl/Cmd, toggles the sidebar. Listened for in SidebarProvider.
Type: "b"
Source: client/lib/utils/constants.js:110
VITE_PACKAGE_VERSION
Current version of the frontend package, injected via Vite env. Used for runtime version display, telemetry, or cache-busting.
Type: any
Source: client/lib/utils/constants.js:16
Source
client/lib/utils/constants.js:1