django-unicorn

The magical reactive component framework for Django ✨

MIT License

Downloads
9.6K
Stars
2.3K
Committers
17

Bot releases are visible (Hide)

django-unicorn - 0.61.0 Latest Release

Published by adamghill 3 months ago

  • Add template_html to specify inline template HTML on the component.
  • Add resolved method which only fires once even when there are multiple actions, e.g. during a debounce.
django-unicorn - 0.60.0

Published by adamghill 8 months ago

  • Silence warnings about multiple root elements for direct views.
  • Handle force_render in nested children for direct views #663.
  • Handle error when manually refreshing direct views.
  • Handle component field type annotations for dataclasses and Pydantic BaseModel #649 by siliconcow.
  • Update startunicorn command to prevent spamming users and handle folder creation for nested components #642 by felipmartins.

Breaking changes

  • Unparseable kwarg argument passed into a component will be considered None instead of being converted to a string.
<!-- 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 %}
django-unicorn - 0.59.0

Published by adamghill 8 months ago

  • Update logic to find components #655 by jacksund.
  • Add fallback location to look for components.
django-unicorn - 0.58.0

Published by adamghill 10 months ago

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.
  • Add force_render and $parent.

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.

django-unicorn - 0.57.1

Published by adamghill 12 months ago

  • Fix: Correctly serialize forms that have a a field with a Select widget.
django-unicorn - 0.57.0

Published by adamghill 12 months ago

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

Published by adamghill about 1 year ago

  • Handle Alpine.js being loaded with defer.
django-unicorn - 0.56.0

Published by adamghill about 1 year ago

  • Add support for using both Alpine.js and Unicorn together in a component (#597 by imankulov).
  • Do not send a 304 if the child has a parent (#595).
  • Prevent sending the child DOM if there is a parent to reduce network payload size.
  • More verbose error message when a component can not be loaded (#453 by nerdoc).
django-unicorn - 0.55.0

Published by adamghill about 1 year ago

Breaking changes

django-unicorn - 0.54.0

Published by adamghill about 1 year ago

  • Coerce type annotated arguments in an action method to the specified type (#571).
  • Fix: Dictionary fields would sometimes create checksum errors (#572).
django-unicorn - 0.53.0

Published by adamghill about 1 year ago

  • Support passing arguments into a component (#560).
  • Fix the handling of None for select elements. (#563).
  • Better handling of AuthenticationForm when used in Component.form_class (#552) by lassebomh.
django-unicorn - 0.52.0

Published by adamghill over 1 year ago

  • Use CSRF_COOKIE_NAME Django setting (#545) by frnidito.
  • Asterisk wildcard support for targeting loading (#543) by regoawt.
django-unicorn - 0.51.0

Published by adamghill over 1 year ago

django-unicorn - 0.50.0

Published by adamghill over 1 year ago

  • Support more than 1 level of nested children (#476 by bazubii).
django-unicorn - 0.49.2

Published by adamghill almost 2 years ago

  • Fix: Calling methods with a model typehint would fail after being called multiple times (#476 by stat1c-void).
django-unicorn - 0.49.1

Published by adamghill almost 2 years ago

  • Fix: Missing pp import in Python 3.7.
django-unicorn - 0.49.0

Published by adamghill almost 2 years ago

  • Fix: Handle inherited (i.e. subclassed) models #459.
  • Fix: Support abbreviated u:view (#464 by nerdoc).
  • Add version and build date to minified JavaScript for easier debugging.
django-unicorn - 0.46.0

Published by adamghill about 2 years ago

  • Support for loading nested components from a route that uses a class-based view.
  • Better support for children components.
django-unicorn - 0.45.1

Published by adamghill about 2 years ago

  • Fix JavaScript error that sometimes happens with nested components. 237 by clangley
django-unicorn - 0.45.0

Published by adamghill over 2 years ago

  • Add ability to render initial data JavaScript inside the rendered component