Components

Latest version: v0.0.1a0

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

Scan your dependencies

Page 3 of 6

0.86

What's Changed

Fix
* Fix upgradecomponent by ekaj2 in https://github.com/EmilStenstrom/django-components/pull/563


**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.85...0.86

0.85

What's Changed

🚨 Breaking changes
- Autodiscovery module resolution changed. Following undocumented behavior was removed:
- Previously, autodiscovery also imported any `[app]/components.py` files, and used `SETTINGS_MODULE` to search for component dirs.
- To migrate from:
- `[app]/components.py` - Define each module in `COMPONENTS.libraries` setting,
or import each module inside the `AppConfig.ready()` hook in respective `apps.py` files.
- `SETTINGS_MODULE` - Define component dirs using `STATICFILES_DIRS`
- Previously, autodiscovery handled relative files in `STATICFILES_DIRS`. To align with Django, `STATICFILES_DIRS` now must be full paths ([Django docs](https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-STATICFILES_DIRS)).

Fix
* Do not aggregate kwargs that start with colon by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/561

Refactor
* Prepare autodiscover and template loader for v1 by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/533

Docs
* Add documentation for jetbrains IDEs by daniboygg in https://github.com/EmilStenstrom/django-components/pull/553

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

**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.84...0.85

0.84

What's Changed
* fix: Do not patch already patched Templates to avoid RecursionError by JuroOravec in https://github.com/EmilStenstrom/django-components/pull/543


**Full Changelog**: https://github.com/EmilStenstrom/django-components/compare/0.83...0.84

0.83

What's Changed

Fix
- fix: Do not escape already escaped slots when slots are given to `slots` kwarg in `Component.render` (https://github.com/EmilStenstrom/django-components/pull/541)
- fix: `html_attrs` - allow `attrs` and `defaults` to be `None` (https://github.com/EmilStenstrom/django-components/pull/541)
- fix: slots inside `{% provide %}` should have access to provided values (https://github.com/EmilStenstrom/django-components/pull/541)

Refactor
- When an error is raised during component rendering, the error now re-raised in each component with additional info. So you can now deduce the component path from the error messages. (https://github.com/EmilStenstrom/django-components/pull/541)


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

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

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.