Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7aea8244 authored by Robin Tissot's avatar Robin Tissot
Browse files

Fixes PHYSICAL_IMG_NR using pk for no good reason.

parent 3bd15f5c
No related branches found
No related tags found
No related merge requests found
......@@ -83,8 +83,9 @@ class DocumentViewSet(ModelViewSet):
part_tmpl = loader.get_template('core/export/alto_part.xml')
response = StreamingHttpResponse(itertools.chain([start],
[part_tmpl.render({
'part': self.get_part_data(pk, transcription)})
for pk in part_pks],
'part': self.get_part_data(pk, transcription),
'counter': i})
for i, pk in enumerate(part_pks)],
[end]),
content_type=content_type)
else:
......
<Page PHYSICAL_IMG_NR="{{ part.pk }}" WIDTH="{{ part.image.width }}" HEIGHT="{{ part.image.height }}" ID="{{part.make_external_id}}">
<Page PHYSICAL_IMG_NR="{{ counter }}" WIDTH="{{ part.image.width }}" HEIGHT="{{ part.image.height }}" ID="{{part.make_external_id}}">
<PrintSpace HPOS="0" VPOS="0" WIDTH="{{ part.image.width }}" HEIGHT="{{ part.image.height }}">
{% regroup part.lines.all by block as part_blocks %}{% for block in part_blocks %}{% ifchanged block.grouper %}
<TextBlock {% if block.grouper %}HPOS="{{ block.grouper.box.0|default:0 }}" VPOS="{{ block.grouper.box.1|default:0 }}" WIDTH="{{ block.grouper.width|default:0 }}" HEIGHT="{{ block.grouper.height|default:0 }}" ID="{{ block.grouper.make_external_id }}"{% else %}ID="eSc_dummyblock_{{ block.list.0.pk }}"{% endif %}>{% endifchanged %}
......
......@@ -7,6 +7,6 @@
{% block body %}
<div class="jumbotron">
<h1>eScriptorium</h1>
<p>A project providing digital recognition of handwritten documents using machine learning techniques<p>
<p>{% trans "A project providing digital recognition of handwritten documents using machine learning techniques." %}<p>
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment