Skip to content

Commit 7bdcba4

Browse files
Built site for gh-pages
1 parent 8963d77 commit 7bdcba4

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2e246554
1+
89d5ecba

docs/customization.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,18 @@ <h4 class="anchored" data-anchor-id="form-validation-strategy">Form validation s
331331
<p>Best practices dictate implementing thorough client-side validation via JavaScript and/or HTML <code>input</code> element <code>pattern</code> attributes to: - Provide immediate feedback to users - Reduce server load - Improve user experience by avoiding round-trips to the server - Prevent malformed data from ever reaching the backend</p>
332332
<p>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 <code>templates/authentication/register.html</code> for a client-side form validation example involving both JavaScript and HTML regex <code>pattern</code> matching.</p>
333333
</section>
334+
<section id="email-templating" class="level4">
335+
<h4 class="anchored" data-anchor-id="email-templating">Email templating</h4>
336+
<p>Password reset and other transactional emails are also handled through Jinja2 templates, located in the <code>templates/emails</code> directory. The email templates follow the same inheritance pattern as web templates, with <code>base_email.html</code> providing the common layout and styling.</p>
337+
<p>Here’s how the default password reset email template looks:</p>
338+
<div class="quarto-figure quarto-figure-center">
339+
<figure class="figure">
340+
<p><img src="static/reset_email.png" class="img-fluid figure-img"></p>
341+
<figcaption>Default Password Reset Email Template</figcaption>
342+
</figure>
343+
</div>
344+
<p>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 <code>reset_url</code> in the password reset template).</p>
345+
</section>
334346
</section>
335347
<section id="writing-type-annotated-code" class="level3">
336348
<h3 class="anchored" data-anchor-id="writing-type-annotated-code">Writing type annotated code</h3>

docs/static/documentation.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,16 @@ Best practices dictate implementing thorough client-side validation via JavaScri
790790

791791
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.
792792

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:
798+
799+
![Default Password Reset Email Template](static/reset_email.png)
800+
801+
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+
793803
### Writing type annotated code
794804

795805
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.

docs/static/reset_email.png

55.4 KB
Loading

search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sitemap.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://Promptly-Technologies-LLC.github.io/fastapi-jinja2-postgres-webapp/index.html</loc>
5-
<lastmod>2024-12-02T01:26:58.268Z</lastmod>
5+
<lastmod>2024-12-02T21:26:46.910Z</lastmod>
66
</url>
77
<url>
88
<loc>https://Promptly-Technologies-LLC.github.io/fastapi-jinja2-postgres-webapp/docs/deployment.html</loc>
@@ -14,18 +14,18 @@
1414
</url>
1515
<url>
1616
<loc>https://Promptly-Technologies-LLC.github.io/fastapi-jinja2-postgres-webapp/docs/architecture.html</loc>
17-
<lastmod>2024-11-27T22:39:38.560Z</lastmod>
17+
<lastmod>2024-12-02T21:26:46.820Z</lastmod>
1818
</url>
1919
<url>
2020
<loc>https://Promptly-Technologies-LLC.github.io/fastapi-jinja2-postgres-webapp/docs/authentication.html</loc>
2121
<lastmod>2024-11-27T22:39:38.590Z</lastmod>
2222
</url>
2323
<url>
2424
<loc>https://Promptly-Technologies-LLC.github.io/fastapi-jinja2-postgres-webapp/docs/customization.html</loc>
25-
<lastmod>2024-12-02T01:50:44.531Z</lastmod>
25+
<lastmod>2024-12-02T22:06:27.789Z</lastmod>
2626
</url>
2727
<url>
2828
<loc>https://Promptly-Technologies-LLC.github.io/fastapi-jinja2-postgres-webapp/docs/installation.html</loc>
29-
<lastmod>2024-12-02T01:59:51.609Z</lastmod>
29+
<lastmod>2024-12-02T21:26:46.850Z</lastmod>
3030
</url>
3131
</urlset>

0 commit comments

Comments
 (0)