Overview
Each render.py jinja template is broken down into components. Components are used to encourage reuse between deliverables. Most templates use at least a few key components, such as:
- header
- mailing-info
- policy-term-information
There are also groups of templates, such as Billing templates, which use the following components:
- stub
- billing-summary
- billing-schedule
Others, like Policy Application, Quote Summary, and Declaration use the following components:
- policy-coverages
- rating-information
Most components receive a default argument. This is because many components in the same template use the same set of data, so to avoid sending each piece of data as an argument, or to avoid requesting the same piece of data more than once, we group this data in a default dictionary, which we then pass over to multiple components.
Refer to the render.py jinja templates components reference for information on available components and their arguments.
Folder structure
- Client deliverables are saved in the clients directory.
- The
clients
directory includes other directories specific to each client. - The main directory in a client-specific directory is templates. It includes three other directories:
components
,layouts
,objects.
- The
components
dir is where reusable components are saved, which are then imported into deliverables. - The
objects
dir is where reusable asset components are saved. - The
layouts
dir is where the main files for each deliverable are saved. These files include code specific to each deliverable, while also importing components and objects.
Components used in deliverables
Table 1 outlines the components names and the deliverables they appear in.
Table 1: Components use table.
Component name | Deliverables |
header | All deliverables |
mailing-info | All deliverables |
policy-term-information | All deliverables |
policy-coverages | Policy Application, Quote Summary and Declaration |
rating-information | Policy Application, Quote Summary and Declaration |
forms | Policy Application, Quote Summary and Declaration |
mortgagees | Policy Application, Quote Summary and Declaration |
credit-score-permission | Policy Application |
loss-history | Policy Application |
underwriting-questions | Policy Application |
underwriting | Policy Application |
signature | Policy Application, Declaration |
schedule-of-coverages | Policy Application, Declaration, Quote Summary |
billing-summary | Initial Billing Statement, Renewal Billing Statement, Amended Billing Statement |
billing-schedule | Initial Billing Statement, Renewal Billing Statement, Amended Billing Statement, Installment Billing Statement |
stub | Initial Billing Statement, Renewal Billing Statement, Amended Billing Statement, Installment Billing Statement, Confirmation of Cancellation, Insurance Renewal Reminder, Notice of Cancellation Non-Payment of Premium, Policy Application, Cancellation Billing Statement Due Immediately |