mirror of
https://github.com/django-components/django-components.git
synced 2025-08-10 17:28:00 +00:00

* 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
24 lines
637 B
Markdown
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,
|
|
...
|
|
}
|
|
```
|