Skip to content

Commit

Permalink
Prepare for the exiting example to go second.
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Aug 25, 2024
1 parent e16d037 commit 2b287e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ Partial Rendering
For requests made with htmx, you may want to reduce the page content you render, since only part of the page gets updated.
This is a small optimization compared to correctly setting up compression, caching, etc.


TODO: Move the template-partials version here.


Swapping the base template
~~~~~~~~~~~~~~~~~~~~~~~~~~

Another technique, that's a little more manual, but good to have on-hand in
case you need it, is to swap the base template in your view.

You can use Django’s template inheritance to limit rendered content to only the affected section.
In your view, set up a context variable for your base template like so:

Expand Down

0 comments on commit 2b287e5

Please sign in to comment.