Django-pattern-library

Latest version: v1.2.0

Safety actively analyzes 621173 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.2.0

Added

- Add support for Django 5.0 ([241](https://github.com/torchbox/django-pattern-library/pull/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 the `default_html` parameter to `override_tag`. Passing a non-string now raises a `TypeError` when using Django >= 4.0, and raises a warning for older versions ([issue 211](https://github.com/torchbox/django-pattern-library/issues/211)).

1.1.0

[1.1.0](https://github.com/torchbox/django-pattern-library/releases/tag/v1.1.0) - 2023-10-25

Added

- Add support for Django 4.2 ([231](https://github.com/torchbox/django-pattern-library/pull/231))

Changed

- Switch to the `poetry-core` build backend ([232](https://github.com/torchbox/django-pattern-library/pull/232))

Removed

- Drop support for Python 3.7 ([231](https://github.com/torchbox/django-pattern-library/pull/231))
- Drop support for Django 4.0 ([231](https://github.com/torchbox/django-pattern-library/pull/231))

Fixed

- Ensure the project root is on `sys.path` so tests etc. can be run in by Docker Compose ([233](https://github.com/torchbox/django-pattern-library/issues/233), [#234](https://github.com/torchbox/django-pattern-library/pull/234))
- Fix URL pattern matching for template with dashes in the file name ([229](https://github.com/torchbox/django-pattern-library/issues/229), [#230](https://github.com/torchbox/django-pattern-library/pull/230))

1.0.0

[1.0.0](https://github.com/torchbox/django-pattern-library/releases/tag/v1.0.0) - 2022-06-10

It’s official!

Added

- We now use type hints for the package’s public API (`register_context_modifier` and `override_tag`) ([172](https://github.com/torchbox/django-pattern-library/issues/172), [#189](https://github.com/torchbox/django-pattern-library/pull/189)).

Removed

- We no longer support Django 2.2, as it has reached its end of life.

0.7.0

Added

- Add a way to customise rendering of a pattern with [`is_pattern_library`](https://torchbox.github.io/django-pattern-library/reference/api/#is_pattern_library) context variable ([156](https://github.com/torchbox/django-pattern-library/issues/156), [#167](https://github.com/torchbox/django-pattern-library/pull/167)).
- Support for Django 4.0 ([164](https://github.com/torchbox/django-pattern-library/pull/164)).
- Tentative support for Django 4.1 ([185](https://github.com/torchbox/django-pattern-library/pull/185)).
- Support for Python 3.10 ([163](https://github.com/torchbox/django-pattern-library/pull/163)).
- Tentative support for Python 3.11 ([185](https://github.com/torchbox/django-pattern-library/pull/185)).
- VS Code devcontainer for development ([178](https://github.com/torchbox/django-pattern-library/pull/178)).
- Documented the need to set `X_FRAME_OPTIONS = "SAMEORIGIN"` to see Django debug responses in the iframe UI ([186](https://github.com/torchbox/django-pattern-library/pull/186)).
- New `/api/v1/render-pattern` [API endpoint to render patterns](https://torchbox.github.io/django-pattern-library/recipes/api-rendering/) via POST requests, with the pattern’s context and tag overrides as a JSON body ([#104](https://github.com/torchbox/django-pattern-library/issues/104), [#168](https://github.com/torchbox/django-pattern-library/pull/168)).

Changed

- Change Poetry version to be `>=1.1.12,<2` in Docker development setup (prevents `JSONDecodeError` issue under Python 3.10) ([178](https://github.com/torchbox/django-pattern-library/pull/178)).
- Move demo/test app pattern-library from `/pattern-library/` to `/` ([178](https://github.com/torchbox/django-pattern-library/pull/178)).
- Allow `.yml` extension for YAML files ([161](https://github.com/torchbox/django-pattern-library/issues/161), [#169](https://github.com/torchbox/django-pattern-library/pull/169)).
- Python files are now formatted by `black` ([187](https://github.com/torchbox/django-pattern-library/pull/187)).
- Fix potential Django 4.0 compatibility issue for components using non-string values in tag overrides ([166](https://github.com/torchbox/django-pattern-library/issues/166), [#188](https://github.com/torchbox/django-pattern-library/pull/188)).

Removed

- We no longer support Python 3.6, as it has reached its end of life ([163](https://github.com/torchbox/django-pattern-library/pull/163)).
- Remove support for IE11 in pattern library UI ([151](https://github.com/torchbox/django-pattern-library/issue/151), [#162](https://github.com/torchbox/django-pattern-library/pull/162)).

0.6.0

[0.6.0](https://github.com/torchbox/django-pattern-library/releases/tag/v0.6.0) - 2021-12-21

- Make `default_app_config conditional` to avoid [deprecation warnings](https://docs.djangoproject.com/en/3.2/ref/applications/#for-application-authors) for Django versions >= 3.2 ([153](https://github.com/torchbox/django-pattern-library/issues/153), [#160](https://github.com/torchbox/django-pattern-library/pull/160)).
- Define `AppConfig.default_auto_field` as [required since Django 3.2](https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys) ([154](https://github.com/torchbox/django-pattern-library/pull/154)).
- Support PyYAML v6 ([158](https://github.com/torchbox/django-pattern-library/pull/158))

0.5.0

Added

Added support for '[context modifiers](https://torchbox.github.io/django-pattern-library/guides/defining-template-context/#modifying-template-contexts-with-python)' - A way to modify template contexts with Python ([141](https://github.com/torchbox/django-pattern-library/pull/141), [#147](https://github.com/torchbox/django-pattern-library/pull/147), [#106](https://github.com/torchbox/django-pattern-library/issues/106)).

This addresses the following limitations of the pattern library:

- [10 No way to specify objects that have attributes and support iteration](https://github.com/torchbox/django-pattern-library/issues/10)
- [113 Django form fields not well supported](https://github.com/torchbox/django-pattern-library/issues/113)
- [135 Competing tag/context config for image provides inconsistent result](https://github.com/torchbox/django-pattern-library/issues/135)

View the [documentation](https://torchbox.github.io/django-pattern-library/guides/defining-template-context/#modifying-template-contexts-with-python), as well as demos leveraging the new capability: [forms](https://torchbox.github.io/django-pattern-library/demo/pattern-library/pattern/patterns/pages/forms/example_form.html) (see [forms and fields recipe](https://torchbox.github.io/django-pattern-library/recipes/forms-and-fields/)), and [pagination](https://torchbox.github.io/django-pattern-library/demo/pattern-library/pattern/patterns/pages/search/search.html) (see [pagination recipe](https://torchbox.github.io/django-pattern-library/recipes/pagination/)).

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.