March 2015
Intermediate to advanced
222 pages
5h 1m
English
Django's template language is quite simple. However, you can save a lot of time by following some elegant template design patterns. Let's take a look at some of them.
Problem: Templates have lots of repeated content in several pages.
Solution: Use template inheritance wherever possible and include snippets elsewhere.
Users expect pages of a website to follow a consistent structure. Certain interface elements, such as navigation menu, headers, and footers are seen in most web applications. However, it is cumbersome to repeat them in every template.
Most templating languages have an include mechanism. The contents of another file, possibly a template, can be included at the position ...
Read now
Unlock full access