Security notes 🚨
It is strongly recommended to read this section before using django-components in production.
Static files
TL;DR: No action needed on v0.100 or later. On an older release, see Pre-v0.100 static files.
Components can be organized however you prefer. That said, our prefered way is to keep the files of a component close together by bundling them in the same directory.
This means that files containing backend logic, such as Python modules and HTML templates, live in the same directory as static files, e.g. JS and CSS.
From v0.100 onwards, we keep component files (as defined by COMPONENTS.dirs and COMPONENTS.app_dirs) separate from the rest of the static files (defined by STATICFILES_DIRS). That way, the Python and HTML files are NOT exposed by the server. Only the static JS, CSS, and other common formats.
Note
If you need to expose different file formats, you can configure these with COMPONENTS.static_files_allowed and COMPONENTS.static_files_forbidden.
For a step-by-step guide on deploying production server with static files, see the demo project.
Reporting a vulnerability
Report a security problem in django-components privately through GitHub, not in a public issue. The security policy has the steps, says which release gets security fixes, and says what to expect.