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>
This commit is contained in:
Juro Oravec 2024-09-06 22:40:39 +02:00 committed by GitHub
parent 589e802625
commit 841dd77e91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 347 additions and 56 deletions

View file

@ -24,6 +24,10 @@ class BaseTestCase(SimpleTestCase):
super().tearDown()
registry.clear()
from django_components.template import _create_template
_create_template.cache_remove() # type: ignore[attr-defined]
request = Mock()
mock_template = Mock()