django-components/docs/templates/reference_settings.md
David Linke 594c0689ba
docs: Move docs-folder to root (#816)
* Move docs-folder form src to root

* Avoid mkdocs package / module name clash

* Update location of docs & add Windows compatibility

* Update requirements-docs

* Update generated file to current state
2024-12-03 12:32:21 +01:00

24 lines
637 B
Markdown

# Settings
You can configure django_components with a global `COMPONENTS` variable in your Django settings file, e.g. `settings.py`.
By default you don't need it set, there are resonable [defaults](#settings-defaults).
To configure the settings you can instantiate [`ComponentsSettings`](../api#django_components.ComponentsSettings)
for validation and type hints. Or, for backwards compatibility, you can also use plain dictionary:
```python
# settings.py
from django_components import ComponentsSettings
COMPONENTS = ComponentsSettings(
autodiscover=True,
...
)
# or
COMPONENTS = {
"autodiscover": True,
...
}
```