Documentation Index
Fetch the complete documentation index at: https://docs.dangoweb.com/llms.txt
Use this file to discover all available pages before exploring further.
Session Variables
These variables must be set in yourreq.session object to enable vars configuration during initialization.
- Summary
- Expanded
| Variable | Purpose | Default Key | Example |
|---|---|---|---|
| userId | Unique identifier for the logged‑in user | username | req.session.username = 'john123' |
| userName | Display name (fallback to userId) | name | req.session.name = 'John Doe' |
| role | User role (admin, dev, user) | role | req.session.role = 'admin' |
| roleAliases | Map custom role names to standard ones | {} | { user: ['client'], admin: ['owner'] } |
| access | Numeric access levels alternative to role | {} | { var: 'access', admin: [2] } |
| commissions | Array of commission objects for the user | commissions | See Commission Object |
| users | List of all system users (for assignment) | users | [{ userId: 'dev1', role: 'dev' }, ...] |
| possibleStatuses | Allowed status values | [] | [{ label: 'Pending', value: 'Pending' }] |
| disableFieldEditing | Field IDs that admins cannot edit | [] | ['amount', 'currency'] |
Commission Object
- Template
- Example
Custom Text
The tenantcustomText configuration allows you to override default text strings used throughout the customText object in the tenant configuration:
- Supported Text
- Example
Handler Functions
The handler hooks give you full control over data persistence:- Summary
- Expanded
| Hook | When Called | Receives | Typical Use |
|---|---|---|---|
| create | After a commission is submitted via the UI | req, data | Save to a relational DB, trigger a webhook, log analytics |
| update | When a commission is edited by a dev or admin | req, data | Update external records, send notification emails, enforce business rules |
| sync | When a user clicks Sync | req | Reconcile session data with a remote source, refresh cached commissions |
