Components

Conjunto uses django-web-components as component library. This supports you to take a component bsed website building approach. Conjunto provides some components that are often needed, like Card.

Make sure your components are loaded at application start:

# apps.py

class MyAppConfig(AppConfig):
    ...

    def ready(self):
        from . import components  # noqa

Card

conjunto.components.Card

Bases: Component

conjunto.components.Updateable

Bases: Component

HTML element that updates itself using HTMX when a certain Javascript event is triggerd anywhere in the body.

Attributes:
  • id

    the id attribute of th div.

  • elt

    the HTML element that should be rendered. Default: div

  • trigger

    the Js event that should trigger the update

  • url

    the URL to call a get request to update the component

Example
{% updateable id="my-card" trigger="person:changed" url=request.path %}

{% url 'person:update' as person_update_url %}
{% updateable elt="ul" id="people-list" trigger="person:changed" url=person_update_url %}