Module Contents#

django_unicorn.views.action_parsers.utils.set_property_value(component: django_unicorn.components.UnicornView, property_name: str, property_value: Any, data: Optional[Dict] = None) None#

Sets properties on the component. Also updates the data dictionary which gets set back as part of the payload.

  • component (param) – Component to set attributes on.

  • property_name (param) – Name of the property.

  • property_value (param) – Value to set on the property.

  • data (param) – Dictionary that gets sent back with the response. Defaults to {}.