diff --git a/dev/reference/django_components/component/index.html b/dev/reference/django_components/component/index.html index 536084ae..efbf5d24 100644 --- a/dev/reference/django_components/component/index.html +++ b/dev/reference/django_components/component/index.html @@ -60,7 +60,7 @@

Inlined CSS associated with this component.

input property ¤

input: Optional[RenderInput[ArgsType, KwargsType, SlotsType]]
 

Input holds the data (like arg, kwargs, slots) that were passsed to the current execution of the render method.

js class-attribute instance-attribute ¤

js: Optional[str] = None
 

Inlined JS associated with this component.

media instance-attribute ¤

media: Media
-

Normalized definition of JS and CSS media files associated with this component.

NOTE: This field is generated from Component.Media class.

response_class class-attribute instance-attribute ¤

response_class = HttpResponse
+

Normalized definition of JS and CSS media files associated with this component.

NOTE: This field is generated from Component.Media class.

response_class class-attribute instance-attribute ¤

response_class = HttpResponse
 

This allows to configure what class is used to generate response from render_to_response

template class-attribute instance-attribute ¤

template: Optional[str] = None
 

Inlined Django template associated with this component.

template_name class-attribute ¤

template_name: Optional[str] = None
 

Relative filepath to the Django template associated with this component.

as_view classmethod ¤

as_view(**initkwargs: Any) -> ViewFn
@@ -305,7 +305,7 @@
         comp = cls()
 
     return comp._render(context, args, kwargs, slots, escape_slots_content)
-

render_css_dependencies ¤

render_css_dependencies() -> SafeString
+

render_css_dependencies ¤

render_css_dependencies() -> SafeString
 

Render only CSS dependencies available in the media class or provided as a string.

Source code in src/django_components/component.py
254
 255
 256
@@ -315,7 +315,7 @@
     if self.css is not None:
         return mark_safe(f"<style>{self.css}</style>")
     return mark_safe("\n".join(self.media.render_css()))
-

render_dependencies ¤

render_dependencies() -> SafeString
+

render_dependencies ¤

render_dependencies() -> SafeString
 

Helper function to render all dependencies for a component.

Source code in src/django_components/component.py
240
 241
 242
@@ -341,7 +341,7 @@
         dependencies.append(js_deps)
 
     return mark_safe("\n".join(dependencies))
-

render_js_dependencies ¤

render_js_dependencies() -> SafeString
+

render_js_dependencies ¤

render_js_dependencies() -> SafeString
 

Render only JS dependencies available in the media class or provided as a string.

Source code in src/django_components/component.py
260
 261
 262
@@ -359,7 +359,7 @@
     kwargs: Optional[KwargsType] = None,
     *response_args: Any,
     **response_kwargs: Any
-) -> HttpResponse
+) -> HttpResponse
 

Render the component and wrap the content in the response class.

The response class is taken from Component.response_class. Defaults to django.http.HttpResponse.

This is the interface for the django.views.View class which allows us to use components as Django views with component.as_view().

Inputs: - args - Positional args for the component. This is the same as calling the component as {% component "my_comp" arg1 arg2 ... %} - kwargs - Kwargs for the component. This is the same as calling the component as {% component "my_comp" key1=val1 key2=val2 ... %} - slots - Component slot fills. This is the same as pasing {% fill %} tags to the component. Accepts a dictionary of { slot_name: slot_content } where slot_content can be a string or render function. - escape_slots_content - Whether the content from slots should be escaped. - context - A context (dictionary or Django's Context) within which the component is rendered. The keys on the context can be accessed from within the template. - NOTE: In "isolated" mode, context is NOT accessible, and data MUST be passed via component's args and kwargs.

Any additional args and kwargs are passed to the response_class.

Example:

MyComponent.render_to_response(
     args=[1, "two", {}],
     kwargs={
diff --git a/dev/reference/django_components/context/index.html b/dev/reference/django_components/context/index.html
index 36189cf2..8df34d98 100644
--- a/dev/reference/django_components/context/index.html
+++ b/dev/reference/django_components/context/index.html
@@ -1,4 +1,4 @@
- context - Django-Components context - Django-Components" >  context - Django-Components" >       

context ¤

This file centralizes various ways we use Django's Context class pass data across components, nodes, slots, and contexts.

You can think of the Context as our storage system.

copy_forloop_context ¤

copy_forloop_context(from_context: Context, to_context: Context) -> None
+ context - Django-Components context - Django-Components" >  context - Django-Components" >       

context ¤

This file centralizes various ways we use Django's Context class pass data across components, nodes, slots, and contexts.

You can think of the Context as our storage system.

copy_forloop_context ¤

copy_forloop_context(from_context: Context, to_context: Context) -> None
 

Forward the info about the current loop

Source code in src/django_components/context.py
64
 65
 66
@@ -20,7 +20,7 @@
     if "forloop" in from_context:
         forloop_dict_index = find_last_index(from_context.dicts, lambda d: "forloop" in d)
         to_context.update(from_context.dicts[forloop_dict_index])
-

get_injected_context_var ¤

get_injected_context_var(component_name: str, context: Context, key: str, default: Optional[Any] = None) -> Any
+

get_injected_context_var ¤

get_injected_context_var(component_name: str, context: Context, key: str, default: Optional[Any] = None) -> Any
 

Retrieve a 'provided' field. The field MUST have been previously 'provided' by the component's ancestors using the {% provide %} template tag.

Source code in src/django_components/context.py
 77
  78
  79
@@ -78,7 +78,7 @@
         f" To fix this, make sure that at least one ancestor of component '{component_name}' has"
         f" the variable '{key}' in their 'provide' attribute."
     )
-

prepare_context ¤

prepare_context(context: Context, component_id: str) -> None
+

prepare_context ¤

prepare_context(context: Context, component_id: str) -> None
 

Initialize the internal context state.

Source code in src/django_components/context.py
22
 23
 24
@@ -100,7 +100,7 @@
         context[_FILLED_SLOTS_CONTENT_CONTEXT_KEY] = {}
 
     set_component_id(context, component_id)
-

set_component_id ¤

set_component_id(context: Context, component_id: str) -> None
+

set_component_id ¤

set_component_id(context: Context, component_id: str) -> None
 

We use the Context object to pass down info on inside of which component we are currently rendering.

Source code in src/django_components/context.py
53
 54
 55
@@ -118,7 +118,7 @@
     # is the top-most or not. If it is, then "_parent_component_id" is None
     context[_PARENT_COMP_CONTEXT_KEY] = context.get(_CURRENT_COMP_CONTEXT_KEY, None)
     context[_CURRENT_COMP_CONTEXT_KEY] = component_id
-

set_provided_context_var ¤

set_provided_context_var(context: Context, key: str, provided_kwargs: Dict[str, Any]) -> None
+

set_provided_context_var ¤

set_provided_context_var(context: Context, key: str, provided_kwargs: Dict[str, Any]) -> None
 

'Provide' given data under given key. In other words, this data can be retrieved using self.inject(key) inside of get_context_data() method of components that are nested inside the {% provide %} tag.

Source code in src/django_components/context.py
108
 109
 110
diff --git a/dev/reference/django_components/index.html b/dev/reference/django_components/index.html
index 379729aa..8901c75b 100644
--- a/dev/reference/django_components/index.html
+++ b/dev/reference/django_components/index.html
@@ -244,7 +244,7 @@
 

Inlined CSS associated with this component.

input property ¤

input: Optional[RenderInput[ArgsType, KwargsType, SlotsType]]
 

Input holds the data (like arg, kwargs, slots) that were passsed to the current execution of the render method.

js class-attribute instance-attribute ¤

js: Optional[str] = None
 

Inlined JS associated with this component.

media instance-attribute ¤

media: Media
-

Normalized definition of JS and CSS media files associated with this component.

NOTE: This field is generated from Component.Media class.

response_class class-attribute instance-attribute ¤

response_class = HttpResponse
+

Normalized definition of JS and CSS media files associated with this component.

NOTE: This field is generated from Component.Media class.

response_class class-attribute instance-attribute ¤

response_class = HttpResponse
 

This allows to configure what class is used to generate response from render_to_response

template class-attribute instance-attribute ¤

template: Optional[str] = None
 

Inlined Django template associated with this component.

template_name class-attribute ¤

template_name: Optional[str] = None
 

Relative filepath to the Django template associated with this component.

as_view classmethod ¤

as_view(**initkwargs: Any) -> ViewFn
@@ -489,7 +489,7 @@
         comp = cls()
 
     return comp._render(context, args, kwargs, slots, escape_slots_content)
-

render_css_dependencies ¤

render_css_dependencies() -> SafeString
+

render_css_dependencies ¤

render_css_dependencies() -> SafeString
 

Render only CSS dependencies available in the media class or provided as a string.

Source code in src/django_components/component.py
254
 255
 256
@@ -499,7 +499,7 @@
     if self.css is not None:
         return mark_safe(f"<style>{self.css}</style>")
     return mark_safe("\n".join(self.media.render_css()))
-

render_dependencies ¤

render_dependencies() -> SafeString
+

render_dependencies ¤

render_dependencies() -> SafeString
 

Helper function to render all dependencies for a component.

Source code in src/django_components/component.py
240
 241
 242
@@ -525,7 +525,7 @@
         dependencies.append(js_deps)
 
     return mark_safe("\n".join(dependencies))
-

render_js_dependencies ¤

render_js_dependencies() -> SafeString
+

render_js_dependencies ¤

render_js_dependencies() -> SafeString
 

Render only JS dependencies available in the media class or provided as a string.

Source code in src/django_components/component.py
260
 261
 262
@@ -543,7 +543,7 @@
     kwargs: Optional[KwargsType] = None,
     *response_args: Any,
     **response_kwargs: Any
-) -> HttpResponse
+) -> HttpResponse
 

Render the component and wrap the content in the response class.

The response class is taken from Component.response_class. Defaults to django.http.HttpResponse.

This is the interface for the django.views.View class which allows us to use components as Django views with component.as_view().

Inputs: - args - Positional args for the component. This is the same as calling the component as {% component "my_comp" arg1 arg2 ... %} - kwargs - Kwargs for the component. This is the same as calling the component as {% component "my_comp" key1=val1 key2=val2 ... %} - slots - Component slot fills. This is the same as pasing {% fill %} tags to the component. Accepts a dictionary of { slot_name: slot_content } where slot_content can be a string or render function. - escape_slots_content - Whether the content from slots should be escaped. - context - A context (dictionary or Django's Context) within which the component is rendered. The keys on the context can be accessed from within the template. - NOTE: In "isolated" mode, context is NOT accessible, and data MUST be passed via component's args and kwargs.

Any additional args and kwargs are passed to the response_class.

Example:

MyComponent.render_to_response(
     args=[1, "two", {}],
     kwargs={
@@ -1176,7 +1176,7 @@
         return component
 
     return decorator
-

context ¤

This file centralizes various ways we use Django's Context class pass data across components, nodes, slots, and contexts.

You can think of the Context as our storage system.

copy_forloop_context ¤

copy_forloop_context(from_context: Context, to_context: Context) -> None
+

context ¤

This file centralizes various ways we use Django's Context class pass data across components, nodes, slots, and contexts.

You can think of the Context as our storage system.

copy_forloop_context ¤

copy_forloop_context(from_context: Context, to_context: Context) -> None
 

Forward the info about the current loop

Source code in src/django_components/context.py
64
 65
 66
@@ -1198,7 +1198,7 @@
     if "forloop" in from_context:
         forloop_dict_index = find_last_index(from_context.dicts, lambda d: "forloop" in d)
         to_context.update(from_context.dicts[forloop_dict_index])
-

get_injected_context_var ¤

get_injected_context_var(component_name: str, context: Context, key: str, default: Optional[Any] = None) -> Any
+

get_injected_context_var ¤

get_injected_context_var(component_name: str, context: Context, key: str, default: Optional[Any] = None) -> Any
 

Retrieve a 'provided' field. The field MUST have been previously 'provided' by the component's ancestors using the {% provide %} template tag.

Source code in src/django_components/context.py
 77
  78
  79
@@ -1256,7 +1256,7 @@
         f" To fix this, make sure that at least one ancestor of component '{component_name}' has"
         f" the variable '{key}' in their 'provide' attribute."
     )
-

prepare_context ¤

prepare_context(context: Context, component_id: str) -> None
+

prepare_context ¤

prepare_context(context: Context, component_id: str) -> None
 

Initialize the internal context state.

Source code in src/django_components/context.py
22
 23
 24
@@ -1278,7 +1278,7 @@
         context[_FILLED_SLOTS_CONTENT_CONTEXT_KEY] = {}
 
     set_component_id(context, component_id)
-

set_component_id ¤

set_component_id(context: Context, component_id: str) -> None
+

set_component_id ¤

set_component_id(context: Context, component_id: str) -> None
 

We use the Context object to pass down info on inside of which component we are currently rendering.

Source code in src/django_components/context.py
53
 54
 55
@@ -1296,7 +1296,7 @@
     # is the top-most or not. If it is, then "_parent_component_id" is None
     context[_PARENT_COMP_CONTEXT_KEY] = context.get(_CURRENT_COMP_CONTEXT_KEY, None)
     context[_CURRENT_COMP_CONTEXT_KEY] = component_id
-

set_provided_context_var ¤

set_provided_context_var(context: Context, key: str, provided_kwargs: Dict[str, Any]) -> None
+

set_provided_context_var ¤

set_provided_context_var(context: Context, key: str, provided_kwargs: Dict[str, Any]) -> None
 

'Provide' given data under given key. In other words, this data can be retrieved using self.inject(key) inside of get_context_data() method of components that are nested inside the {% provide %} tag.

Source code in src/django_components/context.py
108
 109
 110
@@ -1670,7 +1670,7 @@
     # NOTE: When debugging tests during development, it may be easier to change
     # this to `print()`
     trace(logger, full_msg)
-

management ¤

commands ¤

upgradecomponent ¤

middleware ¤

ComponentDependencyMiddleware ¤

ComponentDependencyMiddleware(get_response: Callable[[HttpRequest], HttpResponse])
+

management ¤

commands ¤

upgradecomponent ¤

middleware ¤

ComponentDependencyMiddleware ¤

ComponentDependencyMiddleware(get_response: Callable[[HttpRequest], HttpResponse])
 

Middleware that inserts CSS/JS dependencies for all rendered components at points marked with template tags.

Source code in src/django_components/middleware.py
36
 37
 38
@@ -1721,7 +1721,7 @@
     self.node_id = node_id or gen_id()
     self.args = args or []
     self.kwargs = kwargs or RuntimeKwargs({})
-

get_node_children ¤

get_node_children(node: Node, context: Optional[Context] = None) -> NodeList
+

get_node_children ¤

get_node_children(node: Node, context: Optional[Context] = None) -> NodeList
 

Get child Nodes from Node's nodelist atribute.

This function is taken from get_nodes_by_type method of django.template.base.Node.

Source code in src/django_components/node.py
59
 60
 61
@@ -1781,7 +1781,7 @@
         if nodelist:
             nodes.extend(nodelist)
     return nodes
-

get_template_for_include_node ¤

get_template_for_include_node(include_node: IncludeNode, context: Context) -> Template
+

get_template_for_include_node ¤

get_template_for_include_node(include_node: IncludeNode, context: Context) -> Template
 

This snippet is taken directly from IncludeNode.render(). Unfortunately the render logic doesn't separate out template loading logic from rendering, so we have to copy the method.

Source code in src/django_components/node.py
 91
  92
  93
@@ -1839,7 +1839,7 @@
     elif hasattr(template, "template"):
         template = template.template
     return template
-

walk_nodelist ¤

walk_nodelist(nodes: NodeList, callback: Callable[[Node], Optional[str]], context: Optional[Context] = None) -> None
+

walk_nodelist ¤

walk_nodelist(nodes: NodeList, callback: Callable[[Node], Optional[str]], context: Optional[Context] = None) -> None
 

Recursively walk a NodeList, calling callback for each Node.

Source code in src/django_components/node.py
44
 45
 46
@@ -1974,7 +1974,7 @@
     self.name = name
     self.is_required = is_required
     self.is_default = is_default
-

SlotRef ¤

SlotRef(slot: SlotNode, context: Context)
+

SlotRef ¤

SlotRef(slot: SlotNode, context: Context)
 

SlotRef allows to treat a slot as a variable. The slot is rendered only once the instance is coerced to string.

This is used to access slots as variables inside the templates. When a SlotRef is rendered in the template with {{ my_lazy_slot }}, it will output the contents of the slot.

Source code in src/django_components/slots.py
def __init__(self, slot: "SlotNode", context: Context):
@@ -2069,8 +2069,8 @@
             )
     return fill_nodes
 

resolve_slots ¤

resolve_slots(
-    context: Context,
-    template: Template,
+    context: Context,
+    template: Template,
     component_name: Optional[str],
     context_data: Mapping[str, Any],
     fill_content: Dict[SlotName, FillContent],
@@ -2430,7 +2430,7 @@
         tag_formatter = formatter_cls_or_str
 
     return InternalTagFormatter(tag_formatter)
-

template_loader ¤

Template loader that loads templates from each Django app's "components" directory.

Loader ¤

Bases: Loader

get_dirs ¤

get_dirs() -> List[Path]
+

template_loader ¤

Template loader that loads templates from each Django app's "components" directory.

Loader ¤

Bases: Loader

get_dirs ¤

get_dirs() -> List[Path]
 

Prepare directories that may contain component files:

Searches for dirs set in STATICFILES_DIRS settings. If none set, defaults to searching for a "components" app. The dirs in STATICFILES_DIRS must be absolute paths.

Paths are accepted only if they resolve to a directory. E.g. /path/to/django_project/my_app/components/.

If STATICFILES_DIRS is not set or empty, then BASE_DIR is required.

Source code in src/django_components/template_loader.py
15
 16
 17
@@ -2836,7 +2836,7 @@
 
     trace_msg("PARSE", "COMP", result.component_name, tag.id, "...Done!")
     return component_node
-

component_css_dependencies ¤

component_css_dependencies(preload: str = '') -> SafeString
+

component_css_dependencies ¤

component_css_dependencies(preload: str = '') -> SafeString
 

Marks location where CSS link tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
102
 103
 104
@@ -2866,7 +2866,7 @@
             rendered_dependencies.append(component.render_css_dependencies())
 
         return mark_safe("\n".join(rendered_dependencies))
-

component_dependencies ¤

component_dependencies(preload: str = '') -> SafeString
+

component_dependencies ¤

component_dependencies(preload: str = '') -> SafeString
 

Marks location where CSS link and JS script tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
85
 86
 87
@@ -2896,7 +2896,7 @@
             rendered_dependencies.append(component.render_dependencies())
 
         return mark_safe("\n".join(rendered_dependencies))
-

component_js_dependencies ¤

component_js_dependencies(preload: str = '') -> SafeString
+

component_js_dependencies ¤

component_js_dependencies(preload: str = '') -> SafeString
 

Marks location where JS script tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
119
 120
 121
diff --git a/dev/reference/django_components/middleware/index.html b/dev/reference/django_components/middleware/index.html
index cc531f5e..c791f4d7 100644
--- a/dev/reference/django_components/middleware/index.html
+++ b/dev/reference/django_components/middleware/index.html
@@ -1,4 +1,4 @@
- middleware - Django-Components middleware - Django-Components" >  middleware - Django-Components" >       

middleware ¤

ComponentDependencyMiddleware ¤

ComponentDependencyMiddleware(get_response: Callable[[HttpRequest], HttpResponse])
+ middleware - Django-Components middleware - Django-Components" >  middleware - Django-Components" >       

middleware ¤

ComponentDependencyMiddleware ¤

ComponentDependencyMiddleware(get_response: Callable[[HttpRequest], HttpResponse])
 

Middleware that inserts CSS/JS dependencies for all rendered components at points marked with template tags.

Source code in src/django_components/middleware.py
36
 37
 38
diff --git a/dev/reference/django_components/node/index.html b/dev/reference/django_components/node/index.html
index dff1e09a..fd93efd3 100644
--- a/dev/reference/django_components/node/index.html
+++ b/dev/reference/django_components/node/index.html
@@ -25,7 +25,7 @@
     self.node_id = node_id or gen_id()
     self.args = args or []
     self.kwargs = kwargs or RuntimeKwargs({})
-

get_node_children ¤

get_node_children(node: Node, context: Optional[Context] = None) -> NodeList
+

get_node_children ¤

get_node_children(node: Node, context: Optional[Context] = None) -> NodeList
 

Get child Nodes from Node's nodelist atribute.

This function is taken from get_nodes_by_type method of django.template.base.Node.

Source code in src/django_components/node.py
59
 60
 61
@@ -85,7 +85,7 @@
         if nodelist:
             nodes.extend(nodelist)
     return nodes
-

get_template_for_include_node ¤

get_template_for_include_node(include_node: IncludeNode, context: Context) -> Template
+

get_template_for_include_node ¤

get_template_for_include_node(include_node: IncludeNode, context: Context) -> Template
 

This snippet is taken directly from IncludeNode.render(). Unfortunately the render logic doesn't separate out template loading logic from rendering, so we have to copy the method.

Source code in src/django_components/node.py
 91
  92
  93
@@ -143,7 +143,7 @@
     elif hasattr(template, "template"):
         template = template.template
     return template
-

walk_nodelist ¤

walk_nodelist(nodes: NodeList, callback: Callable[[Node], Optional[str]], context: Optional[Context] = None) -> None
+

walk_nodelist ¤

walk_nodelist(nodes: NodeList, callback: Callable[[Node], Optional[str]], context: Optional[Context] = None) -> None
 

Recursively walk a NodeList, calling callback for each Node.

Source code in src/django_components/node.py
44
 45
 46
diff --git a/dev/reference/django_components/slots/index.html b/dev/reference/django_components/slots/index.html
index b6d5d795..2aade278 100644
--- a/dev/reference/django_components/slots/index.html
+++ b/dev/reference/django_components/slots/index.html
@@ -81,7 +81,7 @@
     self.name = name
     self.is_required = is_required
     self.is_default = is_default
-

SlotRef ¤

SlotRef(slot: SlotNode, context: Context)
+

SlotRef ¤

SlotRef(slot: SlotNode, context: Context)
 

SlotRef allows to treat a slot as a variable. The slot is rendered only once the instance is coerced to string.

This is used to access slots as variables inside the templates. When a SlotRef is rendered in the template with {{ my_lazy_slot }}, it will output the contents of the slot.

Source code in src/django_components/slots.py
def __init__(self, slot: "SlotNode", context: Context):
@@ -176,8 +176,8 @@
             )
     return fill_nodes
 

resolve_slots ¤

resolve_slots(
-    context: Context,
-    template: Template,
+    context: Context,
+    template: Template,
     component_name: Optional[str],
     context_data: Mapping[str, Any],
     fill_content: Dict[SlotName, FillContent],
diff --git a/dev/reference/django_components/template_loader/index.html b/dev/reference/django_components/template_loader/index.html
index 18519bb5..3ce67208 100644
--- a/dev/reference/django_components/template_loader/index.html
+++ b/dev/reference/django_components/template_loader/index.html
@@ -1,4 +1,4 @@
- template_loader - Django-Components template_loader - Django-Components" >  template_loader - Django-Components" >      
Skip to content

template_loader ¤

Template loader that loads templates from each Django app's "components" directory.

Loader ¤

Bases: Loader

get_dirs ¤

get_dirs() -> List[Path]
+ template_loader - Django-Components template_loader - Django-Components" >  template_loader - Django-Components" >       

template_loader ¤

Template loader that loads templates from each Django app's "components" directory.

Loader ¤

Bases: Loader

get_dirs ¤

get_dirs() -> List[Path]
 

Prepare directories that may contain component files:

Searches for dirs set in STATICFILES_DIRS settings. If none set, defaults to searching for a "components" app. The dirs in STATICFILES_DIRS must be absolute paths.

Paths are accepted only if they resolve to a directory. E.g. /path/to/django_project/my_app/components/.

If STATICFILES_DIRS is not set or empty, then BASE_DIR is required.

Source code in src/django_components/template_loader.py
15
 16
 17
diff --git a/dev/reference/django_components/templatetags/component_tags/index.html b/dev/reference/django_components/templatetags/component_tags/index.html
index 9f8840ce..adcc03d7 100644
--- a/dev/reference/django_components/templatetags/component_tags/index.html
+++ b/dev/reference/django_components/templatetags/component_tags/index.html
@@ -118,7 +118,7 @@
 
     trace_msg("PARSE", "COMP", result.component_name, tag.id, "...Done!")
     return component_node
-

component_css_dependencies ¤

component_css_dependencies(preload: str = '') -> SafeString
+

component_css_dependencies ¤

component_css_dependencies(preload: str = '') -> SafeString
 

Marks location where CSS link tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
102
 103
 104
@@ -148,7 +148,7 @@
             rendered_dependencies.append(component.render_css_dependencies())
 
         return mark_safe("\n".join(rendered_dependencies))
-

component_dependencies ¤

component_dependencies(preload: str = '') -> SafeString
+

component_dependencies ¤

component_dependencies(preload: str = '') -> SafeString
 

Marks location where CSS link and JS script tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
85
 86
 87
@@ -178,7 +178,7 @@
             rendered_dependencies.append(component.render_dependencies())
 
         return mark_safe("\n".join(rendered_dependencies))
-

component_js_dependencies ¤

component_js_dependencies(preload: str = '') -> SafeString
+

component_js_dependencies ¤

component_js_dependencies(preload: str = '') -> SafeString
 

Marks location where JS script tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
119
 120
 121
diff --git a/dev/reference/django_components/templatetags/index.html b/dev/reference/django_components/templatetags/index.html
index 3559ad42..ab7208e7 100644
--- a/dev/reference/django_components/templatetags/index.html
+++ b/dev/reference/django_components/templatetags/index.html
@@ -118,7 +118,7 @@
 
     trace_msg("PARSE", "COMP", result.component_name, tag.id, "...Done!")
     return component_node
-

component_css_dependencies ¤

component_css_dependencies(preload: str = '') -> SafeString
+

component_css_dependencies ¤

component_css_dependencies(preload: str = '') -> SafeString
 

Marks location where CSS link tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
102
 103
 104
@@ -148,7 +148,7 @@
             rendered_dependencies.append(component.render_css_dependencies())
 
         return mark_safe("\n".join(rendered_dependencies))
-

component_dependencies ¤

component_dependencies(preload: str = '') -> SafeString
+

component_dependencies ¤

component_dependencies(preload: str = '') -> SafeString
 

Marks location where CSS link and JS script tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
85
 86
 87
@@ -178,7 +178,7 @@
             rendered_dependencies.append(component.render_dependencies())
 
         return mark_safe("\n".join(rendered_dependencies))
-

component_js_dependencies ¤

component_js_dependencies(preload: str = '') -> SafeString
+

component_js_dependencies ¤

component_js_dependencies(preload: str = '') -> SafeString
 

Marks location where JS script tags should be rendered.

Source code in src/django_components/templatetags/component_tags.py
119
 120
 121
diff --git a/dev/sitemap.xml.gz b/dev/sitemap.xml.gz
index a0f46d8a..a80b311c 100644
Binary files a/dev/sitemap.xml.gz and b/dev/sitemap.xml.gz differ
diff --git a/versions.json b/versions.json
index 15eebdd1..9795cc4f 100644
--- a/versions.json
+++ b/versions.json
@@ -6,7 +6,7 @@
   },
   {
     "version": "dev",
-    "title": "dev (39cff5a)",
+    "title": "dev (6793aec)",
     "aliases": []
   },
   {