mirror of
https://github.com/django-components/django-components.git
synced 2025-11-25 00:19:39 +00:00
Only render dependencies that are used of a specific page (#52)
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
This commit is contained in:
parent
cc8db8056e
commit
57a5aa0f4b
11 changed files with 2576 additions and 99 deletions
|
|
@ -42,7 +42,7 @@ class SimplifiedInterfaceMediaDefiningClass(MediaDefiningClass):
|
|||
class Component(metaclass=SimplifiedInterfaceMediaDefiningClass):
|
||||
|
||||
def __init__(self, component_name):
|
||||
self.__component_name = component_name
|
||||
self._component_name = component_name
|
||||
self.instance_template = None
|
||||
self.slots = {}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ class Component(metaclass=SimplifiedInterfaceMediaDefiningClass):
|
|||
if settings.DEBUG:
|
||||
warnings.warn(
|
||||
"Component {} was provided with unexpected slots: {}".format(
|
||||
self.__component_name, unexpected_slots
|
||||
self._component_name, unexpected_slots
|
||||
)
|
||||
)
|
||||
for unexpected_slot in unexpected_slots:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue