mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-10 19:08:01 +00:00
* fix(report): support S3 cloud media storage for report and label template loading (#12426) - Prevent TemplateDoesNotExist when using cloud storage backends (e.g. S3 via django-storages) - Update TemplateUploadMixin.template_name to return relative storage path when local file does not exist on disk - Implement ReportTemplateBase.get_template_content() to load content from storage backend and resolve bucket/location prefix mismatches - Add fallback in ReportTemplateBase.render_as_string() to render from storage content when template loader lookup fails - Register InvenTreeStorageTemplateLoader to allow template snippets to resolve directly from default_storage - Add unit tests in S3ReportTemplateTest covering prefix resolution, remote rendering, and storage template loading * fix style * remove weasyprint unavailable hacks this is unrealstic in a full enviroment; the only reason for this is some very constraint sandbox - which is not our run enviroment * fix import --------- Co-authored-by: Matthias Mair <code@mjmair.com> Co-authored-by: Oliver <oliver.henry.walters@gmail.com>