django-components/sampleproject/components/todo/todo.py
Juro Oravec 841dd77e91
refactor: Fix template caching, expose cached_template, Component.template API changes (#647)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-06 22:40:39 +02:00

8 lines
253 B
Python

from django_components import Component, register
@register("todo")
class Todo(Component):
# Templates inside `[your apps]/components` dir and `[project root]/components` dir
# will be automatically found.
template_name = "todo/todo.html"