To understand how
django-pattern-library works, the following concepts are important.
Any template that is displayed by the pattern library is referred to as a pattern. Patterns are divided into two categories: fragments and pages.
To enable them to be correctly displayed in the pattern library,
django-pattern-library will inject the rendered markup of fragments into the pattern base template specified by
This template should include references to any required static files. The rendered markup of fragments will be available in the
pattern_library_rendered_pattern context variable (see the tests for an example).
In contrast to fragments, pages are patterns that include everything they need to be displayed correctly in their markup. Pages are defined by
Any template in that list — or that extends a template in that list — is considered a page and will be displayed as-is when rendered in the pattern library.