Deployed 458e1894
to dev with MkDocs 1.6.1 and mike 2.1.3
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 35 KiB |
BIN
dev/assets/images/social/reference/template_variables.png
Normal file
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB |
BIN
dev/objects.inv
93
dev/reference/template_variables/index.html
Normal file
|
@ -44,6 +44,7 @@ from pathlib import Path
|
|||
from textwrap import dedent
|
||||
from typing import Any, Dict, List, NamedTuple, Optional, Sequence, Tuple, Type, Union
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.urls import URLPattern, URLResolver
|
||||
|
||||
|
@ -465,7 +466,13 @@ def gen_reference_commands():
|
|||
# Add link to source code
|
||||
module_abs_path = import_module(cmd_def_cls.__module__).__file__
|
||||
module_rel_path = Path(module_abs_path).relative_to(Path.cwd()).as_posix() # type: ignore[arg-type]
|
||||
|
||||
# NOTE: Raises `OSError` if the file is not found.
|
||||
try:
|
||||
obj_lineno = inspect.findsource(cmd_def_cls)[1]
|
||||
except Exception:
|
||||
obj_lineno = None
|
||||
|
||||
source_code_link = _format_source_code_html(module_rel_path, obj_lineno)
|
||||
|
||||
# NOTE: For the commands we have to generate the markdown entries ourselves,
|
||||
|
@ -524,7 +531,7 @@ def gen_reference_commands():
|
|||
)
|
||||
|
||||
|
||||
def gen_reference_templatetags():
|
||||
def gen_reference_template_tags():
|
||||
"""
|
||||
Generate documentation for all Django template tags defined by django-components,
|
||||
like `{% slot %}`, `{% component %}`, etc.
|
||||
|
@ -537,7 +544,7 @@ def gen_reference_templatetags():
|
|||
]
|
||||
|
||||
preface = "<!-- Autogenerated by reference.py -->\n\n"
|
||||
preface += (root / "docs/templates/reference_templatetags.md").read_text()
|
||||
preface += (root / "docs/templates/reference_template_tags.md").read_text()
|
||||
out_file = root / "docs/reference/template_tags.md"
|
||||
|
||||
out_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
@ -585,14 +592,14 @@ def gen_reference_templatetags():
|
|||
)
|
||||
|
||||
|
||||
def gen_reference_templatevars():
|
||||
def gen_reference_template_variables():
|
||||
"""
|
||||
Generate documentation for all variables that are available inside the component templates
|
||||
under the `{{ component_vars }}` variable, as defined by `ComponentVars`.
|
||||
"""
|
||||
preface = "<!-- Autogenerated by reference.py -->\n\n"
|
||||
preface += (root / "docs/templates/reference_templatevars.md").read_text()
|
||||
out_file = root / "docs/reference/template_vars.md"
|
||||
preface += (root / "docs/templates/reference_template_variables.md").read_text()
|
||||
out_file = root / "docs/reference/template_variables.md"
|
||||
|
||||
out_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
with out_file.open("w", encoding="utf-8") as f:
|
||||
|
@ -1099,6 +1106,13 @@ def _is_extension_url_api(obj: Any) -> bool:
|
|||
|
||||
def gen_reference():
|
||||
"""The entrypoint to generate all the reference documentation."""
|
||||
|
||||
# Set up Django settings so we can import `extensions`
|
||||
if not settings.configured:
|
||||
settings.configure(
|
||||
BASE_DIR=Path(__file__).parent.parent.parent,
|
||||
)
|
||||
|
||||
gen_reference_api()
|
||||
gen_reference_exceptions()
|
||||
gen_reference_components()
|
||||
|
@ -1106,8 +1120,8 @@ def gen_reference():
|
|||
gen_reference_tagformatters()
|
||||
gen_reference_urls()
|
||||
gen_reference_commands()
|
||||
gen_reference_templatetags()
|
||||
gen_reference_templatevars()
|
||||
gen_reference_template_tags()
|
||||
gen_reference_template_variables()
|
||||
gen_reference_signals()
|
||||
gen_reference_testing_api()
|
||||
gen_reference_extension_hooks()
|
||||
|
|
136
dev/sitemap.xml
|
@ -2,270 +2,270 @@
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/migrating_from_safer_staticfiles/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/release_notes/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/component_caching/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/component_context_scope/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/component_libraries/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/component_registry/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/extensions/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/hooks/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/html_fragments/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/provide_inject/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/rendering_js_css/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/tag_formatters/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/template_tags/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/advanced/testing/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/autodiscovery/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/component_defaults/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/component_views_urls/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/html_attributes/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/html_js_css_files/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/html_js_css_variables/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/http_request/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/render_api/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/rendering_components/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/secondary_js_css_files/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/single_file_components/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/slots/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/subclassing_components/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/template_tag_syntax/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/concepts/fundamentals/typing_and_validation/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/getting_started/adding_js_and_css/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/getting_started/adding_slots/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/getting_started/components_in_templates/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/getting_started/parametrising_components/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/getting_started/rendering_components/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/getting_started/your_first_component/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/guides/devguides/dependency_mgmt/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/guides/devguides/slot_rendering/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/guides/devguides/slots_and_blocks/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/guides/other/troubleshooting/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/guides/setup/caching/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/guides/setup/development_server/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/code_of_conduct/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/community/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/compatibility/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/contributing/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/development/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/installation/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/license/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/migrating/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/performance/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/security_notes/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/overview/welcome/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/api/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/commands/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/components/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/exceptions/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/extension_commands/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/extension_hooks/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/extension_urls/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/settings/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/signals/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/tag_formatters/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/template_tags/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/template_vars/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/template_variables/</loc>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/testing_api/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://django-components.github.io/django-components/latest/reference/urls/</loc>
|
||||
<lastmod>2025-06-08</lastmod>
|
||||
<lastmod>2025-06-10</lastmod>
|
||||
</url>
|
||||
</urlset>
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"version": "dev",
|
||||
"title": "dev (09bcf8d)",
|
||||
"title": "dev (458e189)",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
|
|