To have a folder structure inside components folder (subcomponents?) #1249
-
In django-cotton you can have the next structure for example: cotton/auth/loginmodal.html And then in your templates you can access each of these like: <c-auth.loginmodal></c-auth.loginmodal> This keeps the folder of cotton/ more or less structured and you do not have a ton of unorganized folders, in my project I have around 50 components inside the components/ folder and is not as "neat" as using cotton Open to suggestions to how organize the folder :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think you should be able to introduce extra depth to the components folders, e.g. |-- components/
| |-- auth/
| |-- loginmodal/
| |-- loginmodal.html
| |-- loginmodal.js
| |-- loginmodal.py I use the following setup:
So overall it looks like below - <root>
|-- project/
| |-- components/
| |-- project_member_select/
| |-- project_member_select.html
| |-- project_member_select.js
| |-- project_member_select.py
| |-- project_file_upload/
| |-- pages/
| |-- project/
| |-- project_create/
| |-- project_edit/
|-- process/
| |-- pages/
| |-- process/
| |-- process_edit/
|-- components/
| |-- button/
| |-- button.html
| |-- button.js
| |-- button.py To be able to use COMPONENTS = ComponentsSettings(
app_dirs=["components", "pages"],
) |
Beta Was this translation helpful? Give feedback.
I think you should be able to introduce extra depth to the components folders, e.g.
I use the following setup:
<app>/page
directories and regular components in<app>/components
directoriescomponents/
dir, while business logic is all in corresponding …