Closed wolflu05 closed 1 year ago
Name | Stmts | Miss | Cover | Missing | |
---|---|---|---|---|---|
inventree_bulk_plugin/BulkGenerator/BulkGenerator.py | 111 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/dimensions.py | 66 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/generators/gen_alpha.py | 36 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/generators/gen_numeric.py | 14 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/generators/generator.py | 33 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/template.py | 10 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/utils.py | 2 | 0 | 100% | ||
inventree_bulk_plugin/BulkGenerator/validations.py | 53 | 0 | 100% | ||
inventree_bulk_plugin/InvenTreeBulkPlugin.py | 122 | 0 | 100% | ||
inventree_bulk_plugin/migrations/0001_initial.py | 6 | 0 | 100% | ||
inventree_bulk_plugin/models.py | 21 | 0 | 100% | ||
inventree_bulk_plugin/version.py | 1 | 0 | 100% | ||
TOTAL | 475 | 0 | 100% |
This pr adds two new
len
attributes to the extended Jinja2 context which can be useful for giving the dimension a padding so that they are all equal length.len
- count of elements this child will generatedim.<x>.len
- count of items the x-th dimension hasExample
{{dim.1.zfill(dim.1.len|string|length)}}
can be used to pad the first dimension so that they are all of equal lengthresolves #35