Skip to content

Commit 2c8015f

Browse files
Fix template error
This commit fixes aboutcode-org/scancode-toolkit#1760 Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 40b81c5 commit 2c8015f

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

docs/source/scancode-toolkit/rst_snippets/custom_output_format.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ data for this particular scan.
1818

1919
## template.html:
2020
[
21-
{% if results.license_copyright %}
22-
{% for location, data in results.license_copyright.items() %}
21+
{% if files.license_copyright %}
22+
{% for location, data in files.license_copyright.items() %}
2323
{% for row in data %}
2424
location:"{{ location }}",
2525
{% if row.what == 'copyright' %}copyright:"{{ row.value|escape }}",{% endif %}
@@ -53,8 +53,7 @@ Now are results are saved in ``output.json`` and we can easily view them with ``
5353
copyright:"copyrighted by the Free Software Foundation",
5454
]
5555

56-
..
57-
[ToDo]
58-
There is an error in the template.html file:
59-
"UndefinedError: 'results' is undefined"
60-
Will be solved in a later commit.
56+
For a more elaborate template, refer this `default template <https://github.com/nexB/scancode-toolkit/blob/develop/src/formattedcode/templates/html/template.html>`_
57+
given with Scancode, to generate HTML output with the ``--html`` output format option.
58+
59+
Documentation on `Jinja templates <https://jinja.palletsprojects.com/en/2.10.x/>`_.

0 commit comments

Comments
 (0)