mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-06-13 10:45:32 +00:00
Added a lot of compiled information from the source about which context variables are available where. I just made it a seperate page for now because it got kind of long...
This commit is contained in:
@ -50,21 +50,7 @@ For example, rendering the name of a part (which is available in the particular
|
||||
|
||||
### Context Data
|
||||
|
||||
Each report has access to a number of context variables by default. The following context variables are provided to every report template:
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| date | Current date, represented as a Python datetime.date object |
|
||||
| datetime | Current datetime, represented as a Python datetime object |
|
||||
| default_page_size | InvenTree default page size variable |
|
||||
| report_name | Name of the report template |
|
||||
| report_description | Description of the report template |
|
||||
| report_revision | Revision of the report template |
|
||||
| request | Django request object |
|
||||
| user | User who made the request to render the template |
|
||||
|
||||
!!! info "Specific Report Context"
|
||||
Specific report types may have additional context variables
|
||||
Please refer to the [Context variables](./context_variables.md) page.
|
||||
|
||||
### Conditional Rendering
|
||||
|
||||
|
Reference in New Issue
Block a user