mirror of
https://github.com/django-components/django-components.git
synced 2025-08-30 18:57:20 +00:00
Improve slot handling to allow nested components, conditional slots, and slot.super (Fixes #33, #34, #37)
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
This commit is contained in:
parent
c4db1646db
commit
070b754d24
7 changed files with 459 additions and 69 deletions
|
@ -91,8 +91,7 @@ class RenderBenchmarks(SimpleTestCase):
|
|||
"{% component 'inner_component' variable='foo' %}{% endslot %}{% endcomponent_block %}",
|
||||
name='root')
|
||||
# Sanity tests
|
||||
response = create_and_process_template_response(template)
|
||||
response_content = response.content.decode('utf-8')
|
||||
response_content = create_and_process_template_response(template)
|
||||
self.assertNotIn(CSS_DEPENDENCY_PLACEHOLDER, response_content)
|
||||
self.assertNotIn(JS_DEPENDENCY_PLACEHOLDER, response_content)
|
||||
self.assertIn('style.css', response_content)
|
||||
|
@ -109,8 +108,7 @@ class RenderBenchmarks(SimpleTestCase):
|
|||
from django.template.loader import get_template
|
||||
|
||||
template = get_template('mdn_complete_page.html')
|
||||
response = create_and_process_template_response(template, {})
|
||||
response_content = response.content.decode('utf-8')
|
||||
response_content = create_and_process_template_response(template, {})
|
||||
self.assertNotIn(CSS_DEPENDENCY_PLACEHOLDER, response_content)
|
||||
self.assertNotIn(JS_DEPENDENCY_PLACEHOLDER, response_content)
|
||||
self.assertIn('test.css', response_content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue