Cf. #249 but now for assignments.
This commit is contained in:
parent
aa30a1900b
commit
818a15aa2b
@ -334,6 +334,9 @@ class AssignmentPDF(PDFView):
|
|||||||
if preamble:
|
if preamble:
|
||||||
story.append(Paragraph("%s" % preamble.replace('\r\n','<br/>'), stylesheet['Paragraph']))
|
story.append(Paragraph("%s" % preamble.replace('\r\n','<br/>'), stylesheet['Paragraph']))
|
||||||
story.append(Spacer(0,0.75*cm))
|
story.append(Spacer(0,0.75*cm))
|
||||||
|
if not Assignment.objects.exists(): # No assignments existing
|
||||||
|
story.append(Paragraph(_("No elections existing."), stylesheet['Heading3']))
|
||||||
|
else: # Print all assignments
|
||||||
# List of assignments
|
# List of assignments
|
||||||
for assignment in Assignment.objects.order_by('name'):
|
for assignment in Assignment.objects.order_by('name'):
|
||||||
story.append(Paragraph(assignment.name, stylesheet['Heading3']))
|
story.append(Paragraph(assignment.name, stylesheet['Heading3']))
|
||||||
|
Loading…
Reference in New Issue
Block a user