The most common use of django-components is to render HTML for a given request. As such, there are a few features that are dependent on the request object.
In regular Django templates, the context processors are applied only when the template is rendered with RequestContext.
Components allow you to pass the request object explicitly. Thus, the context processors are applied to components either when:
The component is rendered with RequestContext (Regular Django behavior)
The component is rendered with a regular Context (or none), but you set the request kwarg of Component.render().
The component is nested in another component that matches one of the two conditions above.
# โ No context processors
-rendered=MyComponent.render()
-rendered=MyComponent.render(Context({}))
-
-# โ With context processors
-rendered=MyComponent.render(request=request)
-rendered=MyComponent.render(Context({}),request=request)
-rendered=MyComponent.render(RequestContext(request,{}))
-
When a component is rendered within a template with {% component %} tag, context processors are available depending on whether the template is rendered with RequestContext or not.
The most common use of django-components is to render HTML when the server receives a request. As such, there are a few features that are dependent on the request object.
So the request object is available to components either when:
The component is rendered with RequestContext (Regular Django behavior)
The component is rendered with a regular Context (or none), but you set the request kwarg of Component.render().
The component is nested and the parent has access to the request object.
# โ With request
+MyComponent.render(request=request)
+MyComponent.render(context=RequestContext(request,{}))
+
+# โ Without request
+MyComponent.render()
+MyComponent.render(context=Context({}))
+
When a component is rendered within a template with {% component %} tag, the request object is available depending on whether the template is rendered with RequestContext or not.
\ No newline at end of file
diff --git a/dev/concepts/fundamentals/render_api/index.html b/dev/concepts/fundamentals/render_api/index.html
index 6bc159fc..be543e3f 100644
--- a/dev/concepts/fundamentals/render_api/index.html
+++ b/dev/concepts/fundamentals/render_api/index.html
@@ -22,21 +22,22 @@
args=(123,"str"),slots={"footer":"MY_SLOT"},)
-