mirror of
https://github.com/django-components/django-components.git
synced 2025-12-03 20:00:02 +00:00
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
This commit is contained in:
parent
cdc830fca3
commit
594c0689ba
68 changed files with 116 additions and 108 deletions
1
docs/templates/reference_api.md
vendored
Normal file
1
docs/templates/reference_api.md
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
# API
|
||||
4
docs/templates/reference_commands.md
vendored
Normal file
4
docs/templates/reference_commands.md
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Commands
|
||||
|
||||
These are all the [Django management commands](https://docs.djangoproject.com/en/5.1/ref/django-admin)
|
||||
that will be added by installing `django_components`:
|
||||
3
docs/templates/reference_components.md
vendored
Normal file
3
docs/templates/reference_components.md
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Components
|
||||
|
||||
These are the components provided by django_components.
|
||||
1
docs/templates/reference_exceptions.md
vendored
Normal file
1
docs/templates/reference_exceptions.md
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Exceptions
|
||||
1
docs/templates/reference_middlewares.md
vendored
Normal file
1
docs/templates/reference_middlewares.md
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Middlewares
|
||||
24
docs/templates/reference_settings.md
vendored
Normal file
24
docs/templates/reference_settings.md
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# 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,
|
||||
...
|
||||
}
|
||||
```
|
||||
7
docs/templates/reference_tagformatters.md
vendored
Normal file
7
docs/templates/reference_tagformatters.md
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Tag Formatters
|
||||
|
||||
[Tag formatters](../../concepts/advanced/tag_formatter) allow you to change the syntax for calling components from within
|
||||
the Django templates.
|
||||
|
||||
Tag formatter are set via the [tag_formatter](../settings#django_components.app_settings.ComponentsSettings.tag_formatter)
|
||||
setting.
|
||||
1
docs/templates/reference_templatetags.md
vendored
Normal file
1
docs/templates/reference_templatetags.md
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Template tags
|
||||
5
docs/templates/reference_templatevars.md
vendored
Normal file
5
docs/templates/reference_templatevars.md
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Template variables
|
||||
|
||||
Here is a list of all variables that are automatically available from inside the component's
|
||||
template and in [`on_render_before` / `on_render_after`](../concepts/advanced/hooks.md##available-hooks)
|
||||
hooks.
|
||||
20
docs/templates/reference_urls.md
vendored
Normal file
20
docs/templates/reference_urls.md
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# URLs
|
||||
|
||||
Below are all the URL patterns that will be added by adding `django_components.urls`.
|
||||
|
||||
See [Installation](../overview/installation.md#adding-support-for-js-and-css)
|
||||
on how to add these URLs to your Django project.
|
||||
|
||||
Django components already prefixes all URLs with `components/`. So when you are
|
||||
adding the URLs to `urlpatterns`, you can use an empty string as the first argument:
|
||||
|
||||
```python
|
||||
from django.urls import include, path
|
||||
|
||||
urlpatterns = [
|
||||
...
|
||||
path("", include("django_components.urls")),
|
||||
]
|
||||
```
|
||||
|
||||
## List of URLs
|
||||
Loading…
Add table
Add a link
Reference in a new issue