Configuration
The following configuration can be provided in your `settings.py`:
COTTON_DIR
str (default: 'cotton')
Change the default path in your templates directory where cotton components can be placed, for example "components".
COTTON_BASE_DIR
str (default: None)
The base directory where - in addition to the app folders - cotton will search for the "templates" directory (see above).
If not set, the `BASE_DIR` generated by `django-admin startproject` is used as a fallback, if it exists.
COTTON_SNAKE_CASED_NAMES
bool (default: True)
By default cotton will look for snake case versions of your component names. To turn this behaviour off (useful if you want to permit hyphenated filenames) then set this key to False
.
Example:
<c-my-button />
As True
(default)
Filepath: `cotton/my_button.html`
As False
Filepath: `cotton/my-button.html`