Django-components

Latest version: v0.82

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

Scan your dependencies

Page 1 of 3

0.82

What's Changed

Feat
- Template/JS/CSS file can be specified as `str`, `bytes`, `FileLike`, `SafeString`, or a function that returns any of the other types.
- Support for [Django's "paths as objects"](https://docs.djangoproject.com/en/5.0/topics/forms/media/#paths-as-objects) feature - when template/JS/CSS filepath is a "safe string" object (defines `__html__` method), then we do NOT try to resolve the filename.
- Override how JS/CSS paths are rendered into `<script>`/`<link>` tags by allowing you to provide your own subclass of [Django's Media class](https://docs.djangoproject.com/en/5.0/topics/forms/media) via `Component.media_class`.


**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.81...0.82

0.81

What's Changed

BREAKING CHANGE

- Function signature for `Component.render_to_response` has changes JuroOravec in https://github.com/EmilStenstrom/django-components/pull/521

Feat

- `Component.render` method is now public and documented. `render` and `render_to_response` have been reworked and both allow to specify args, kwargs, slots, and context.
- When passing slots to `render` or `render_to_response`, you can define slots as a string, or as a function.

**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.80...0.81

0.80

What's Changed

Feat
* feat: dependency injection with inject/provide by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/506


**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.79...0.80

0.79

What's Changed

Breaking change
* refactor: change context_behavior default to "django" by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/515
- Default value for the `COMPONENTS.context_behavior` setting was changes from `"isolated"` to `"django"`. If you did not set this value explicitly before, this may be a breaking change. See the rationale for change https://github.com/EmilStenstrom/django-components/issues/498.


**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.78...0.79

0.78

What's Changed
Fix
* fix: typo in html_attrs defaults dict fetching by zachbellay in https://github.com/EmilStenstrom/django-components/pull/513
* fix: compat with block tag in django mode by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/511

Chore
* Better tests coverage via "tests: Split test files and run template tests under both context behavior modes" by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/509

New Contributors
* zachbellay made their first contribution in https://github.com/EmilStenstrom/django-components/pull/513

**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.77...0.78

0.77

What's Changed
Breaking changes
* refactor: change fill alias from "as var" to default=var by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/504


**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.76...0.77

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.