mirror of
https://github.com/django-components/django-components.git
synced 2025-08-25 00:14:04 +00:00
Deployed 1e4b556
to dev with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
parent
d527e10af5
commit
952396ba51
41 changed files with 482 additions and 465 deletions
|
@ -551,6 +551,22 @@ def gen_reference_templatevars():
|
|||
f.write(f"::: {ComponentVars.__module__}.{ComponentVars.__name__}.{field}\n\n")
|
||||
|
||||
|
||||
# NOTE: Unlike other references, the API of Signals is not yet codified (AKA source of truth defined
|
||||
# as Python code). Instead, we manually list all signals that are sent by django-components.
|
||||
def gen_reference_signals():
|
||||
"""
|
||||
Generate documentation for all [Django Signals](https://docs.djangoproject.com/en/5.1/ref/signals) that are
|
||||
send by or during the use of django-components.
|
||||
"""
|
||||
preface = "<!-- Autogenerated by reference.py -->\n\n"
|
||||
preface += (root / "docs/templates/reference_signals.md").read_text()
|
||||
out_file = root / "docs/reference/signals.md"
|
||||
|
||||
out_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
with out_file.open("w", encoding="utf-8") as f:
|
||||
f.write(preface + "\n\n")
|
||||
|
||||
|
||||
def _list_urls(urlpatterns: Sequence[Union[URLPattern, URLResolver]], prefix=""):
|
||||
"""Recursively extract all URLs and their associated views from Django's urlpatterns"""
|
||||
urls: List[str] = []
|
||||
|
@ -732,6 +748,7 @@ def gen_reference():
|
|||
gen_reference_commands()
|
||||
gen_reference_templatetags()
|
||||
gen_reference_templatevars()
|
||||
gen_reference_signals()
|
||||
|
||||
|
||||
# This is run when `gen-files` plugin is run in mkdocs.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue