django-simple-components

Create components inside your templates without saving them in the templates folder.

MIT License

Downloads
96
Stars
6

Bot releases are hidden (Show)

django-simple-components - Small fix Latest Release

Published by paqstd-dev 12 months ago

Fixed bug for deploy new version to PyPI.

django-simple-components - Initial Release

Published by paqstd-dev 12 months ago

Django Simple Components is a small package to easily create components inside your templates without saving them in the templates folder.

{% load simple_components %}

{% set_component "first_component" %}
    <div class="card">
        <h3>{{ title }}</h3>
        <p>{{ description }}</p>
    </div>
{% end_set_component %}

<div class="card-list">
    {% component "first_component" title="Hello world!" description="Some text..." %}
    {% component "first_component"
        title="Some lines"
        description="Other text..."
    %}

    {% with value="this text will be capitalized later" %}
        {% component "first_component" title=123 description=value|capfirst %}
    {% endwith %}
</div>