Skip to content
Snippets Groups Projects
Commit 1c3ea3ec authored by permcu's avatar permcu
Browse files

Properly provide group wrapped in list in template

parent e288bad8
No related branches found
No related tags found
1 merge request!422Resolve "Add export functionality to course book"
...@@ -125,6 +125,9 @@ def generate_full_register_printout( ...@@ -125,6 +125,9 @@ def generate_full_register_printout(
), ),
) )
if include_teachers_and_subjects_table:
group.as_list = [group]
if include_coursebook: if include_coursebook:
group.documentations_by_day = {} group.documentations_by_day = {}
documentations = documentations.order_by("datetime_start").prefetch_related( documentations = documentations.order_by("datetime_start").prefetch_related(
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
{% if include_teachers_and_subjects_table %} {% if include_teachers_and_subjects_table %}
{% if group.courses %} {% if group.courses %}
<h4>{% trans 'Teachers and lessons in group' %} {{ group.name }}</h4> <h4>{% trans 'Teachers and lessons in group' %} {{ group.name }}</h4>
{% include "alsijil/partials/register_teachers_and_subjects_table.html" with groups=[group] only %} {% include "alsijil/partials/register_teachers_and_subjects_table.html" with groups=group.as_list only %}
<div class="page-break">&nbsp;</div> <div class="page-break">&nbsp;</div>
{% endif %} {% endif %}
{% if group.child_groups %} {% if group.child_groups %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment