InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

!backend(refactor): move to default engine

Open matmair opened this issue 5 months ago • 5 comments

Follow up to https://github.com/inventree/InvenTree/pull/10051 - moves file name rending to the default rendering engine instead of jinja2 This might be breaking in some cases

matmair avatar Jul 21 '25 17:07 matmair

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
Latest commit 069ed91b00a88eb8a6844b2303119261e731d431
Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/69067bb7bd6496000813a1be

netlify[bot] avatar Jul 21 '25 17:07 netlify[bot]

@inventree/triage I can not remember why we used Jinja2 instead of the normal templating engine - this removes our direct dependency on jinja2. This be breaking in some edge cases

matmair avatar Jul 21 '25 17:07 matmair

I have a vague recollection that it was due to how we provide context for simple string rendering (e.g. for batch codes, order reference strings, filenames for generated reports). It looks like that is where the PR is failing currently.

If we can work around this and get those string rendering functions working, I'm happy to remove the dep and make this change

SchrodingersGat avatar Jul 22 '25 00:07 SchrodingersGat

I will have to take a deeper look, puhsing this back

matmair avatar Jul 27 '25 21:07 matmair

One difficulty here is that the jinja syntax we use in PART_NAME_FORMAT is incompatible with the django template syntax - so we will need to make a breaking change to that format string

SchrodingersGat avatar Nov 01 '25 02:11 SchrodingersGat