You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization.qmd
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -138,6 +138,16 @@ Best practices dictate implementing thorough client-side validation via JavaScri
138
138
139
139
Server-side validation remains essential as a security measure against malicious requests that bypass client-side validation, but it should rarely be encountered during normal user interaction. See `templates/authentication/register.html` for a client-side form validation example involving both JavaScript and HTML regex `pattern` matching.
140
140
141
+
#### Email templating
142
+
143
+
Password reset and other transactional emails are also handled through Jinja2 templates, located in the `templates/emails` directory. The email templates follow the same inheritance pattern as web templates, with `base_email.html` providing the common layout and styling.
144
+
145
+
Here's how the default password reset email template looks:
The email templates use inline CSS styles to ensure consistent rendering across email clients. Like web templates, they can receive context variables from the Python code (such as `reset_url` in the password reset template).
150
+
141
151
### Writing type annotated code
142
152
143
153
Pydantic is used for data validation and serialization. It ensures that the data received in requests meets the expected format and constraints. Pydantic models are used to define the structure of request and response data, making it easy to validate and parse JSON payloads.
Copy file name to clipboardExpand all lines: docs/static/documentation.txt
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -790,6 +790,16 @@ Best practices dictate implementing thorough client-side validation via JavaScri
790
790
791
791
Server-side validation remains essential as a security measure against malicious requests that bypass client-side validation, but it should rarely be encountered during normal user interaction. See `templates/authentication/register.html` for a client-side form validation example involving both JavaScript and HTML regex `pattern` matching.
792
792
793
+
#### Email templating
794
+
795
+
Password reset and other transactional emails are also handled through Jinja2 templates, located in the `templates/emails` directory. The email templates follow the same inheritance pattern as web templates, with `base_email.html` providing the common layout and styling.
796
+
797
+
Here's how the default password reset email template looks:
The email templates use inline CSS styles to ensure consistent rendering across email clients. Like web templates, they can receive context variables from the Python code (such as `reset_url` in the password reset template).
802
+
793
803
### Writing type annotated code
794
804
795
805
Pydantic is used for data validation and serialization. It ensures that the data received in requests meets the expected format and constraints. Pydantic models are used to define the structure of request and response data, making it easy to validate and parse JSON payloads.
0 commit comments