Django-unicorn

Latest version: v0.61.0

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

Scan your dependencies

Page 1 of 14

0.60.0

- Silence warnings about multiple root elements for direct views.
- Handle `force_render` in nested children for direct views [663](https://github.com/adamghill/django-unicorn/pull/663).
- Handle error when manually refreshing direct views.
- Handle component field type annotations for `dataclasses` and `Pydantic` `BaseModel` [649](https://github.com/adamghill/django-unicorn/pull/649) by [siliconcow](https://github.com/siliconcow).
- Update `startunicorn` command to prevent spamming users and handle folder creation for nested components [642](https://github.com/adamghill/django-unicorn/pull/642) by [felipmartins](https://github.com/felipmartins).

**Breaking changes**

- Unparseable `kwarg` argument passed into a component will be considered `None` instead of being converted to a string.

html
<!-- If `abcde` is not a variable in the template context, it will get set to `name` as `None` whereas before it would get set as 'abcde' -->
{% unicorn 'hello' name=abcde %}

0.59.0

- Update logic to find components [655](https://github.com/adamghill/django-unicorn/pull/655) by [jacksund](https://github.com/jacksund).
- Add fallback location to look for components.

0.58.0

This release could not have been made possible without the generous support of winrid and om-proptech. Thank you for sponsoring me and believing in `django-unicorn`! It also includes critical improvements to nested components from imankulov.

- Handle a list of `ValidationError` or just a string instead of requiring a the `dict` version.
- Better support for type annotations for component fields.
- Improved nested component support by [imankulov](https://github.com/imankulov).
- Add [`force_render`](views.mdforce_render) and [`$parent`](actions.mdparent).

**Breaking changes**

Child components will not *by default* render the parent component anymore. If this is required for your child component, specify `self.parent.force_render = True` in any action that requires the parent to re-render. This change will reduce network bandwidth and isolates the amount of re-rendering required for nested components.

0.57.1

- Fix: Correctly serialize forms that have a a field with a Select widget.

0.57.0

- Warn if there is a missing root element.
- Use `unicorn:id` to merge elements with `morphdom`.

0.56.1

- Handle Alpine.js being loaded with defer.

Page 1 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.