Releases: torchbox/django-pattern-library
Releases · torchbox/django-pattern-library
v1.2.0 - Django 5.0 support and bugfix for invalid tag overrides
Added
- Add support for Django 5.0 (#241)
Changed
- From Django >= 4.0, calls to
Node.render()
must always return a string, but this app previously allowed non-string values to be passed in thedefault_html
parameter tooverride_tag
. Passing a non-string now raises aTypeError
when using Django >= 4.0, and raises a warning for older versions (issue #211).
v1.1.0 - Django 4.2 support and a bugfix for templates with dashes in the filename
v1.0.0 – the stable one
v0.7.0 - Django 4.0, Python 3.10 and an API
Added
- Add a way to customise rendering of a pattern with
is_pattern_library
context variable (#156, #167). - Support for Django 4.0 (#164).
- Tentative support for Django 4.1 (#185).
- Support for Python 3.10 (#163).
- Tentative support for Python 3.11 (#185).
- VS Code devcontainer for development (#178).
- Documented the need to set
X_FRAME_OPTIONS = "SAMEORIGIN"
to see Django debug responses in the iframe UI (#186). - New
/api/v1/render-pattern
API endpoint to render patterns via POST requests, with the pattern’s context and tag overrides as a JSON body (#104, #168).
Changed
- Change Poetry version to be
>=1.1.12,<2
in Docker development setup (preventsJSONDecodeError
issue under Python 3.10) (#178). - Move demo/test app pattern-library from
/pattern-library/
to/
(#178). - Allow
.yml
extension for YAML files (#161, #169). - Python files are now formatted by
black
(#187). - Fix potential Django 4.0 compatibility issue for components using non-string values in tag overrides (#166, #188).
Removed
v0.6.0 – Django 3.2 compat
0.6.0 - 2021-12-21
- Make
default_app_config conditional
to avoid deprecation warnings for Django versions >= 3.2 (#153, #160). - Define
AppConfig.default_auto_field
as required since Django 3.2 (#154). - Support PyYAML v6 (#158)
v0.5.0 – Python context modifiers 🎉
Added
Added support for 'context modifiers' - A way to modify template contexts with Python (#141, #147, #106).
This addresses the following limitations of the pattern library:
- #10 No way to specify objects that have attributes and support iteration
- #113 Django form fields not well supported
- #135 Competing tag/context config for image provides inconsistent result
View the documentation, as well as demos leveraging the new capability: forms (see forms and fields recipe), and pagination (see pagination recipe).
v0.4.0
v0.3.0
We have a new documentation website! Check out torchbox.github.io/django-pattern-library.
Added
- This package now supports Django 3.1, and has tentative support for Django 3.2
- We also now support Python 3.9
- Implement optional default for override_tag (#125)
- A new
render_patterns
command makes it possible to export the pattern library templates for automated tests or static hosting (#16, #17) - Permit variable template names in extends and include tags (#112)
Removed
- We no longer support Django 1.11, 2.0, 2.1
- The project no longer includes polyfills for all ES6 features, and only supports modern browsers.