Short message on PDF if there are no applications (#249)
This commit is contained in:
parent
cb2a4b9897
commit
aa30a1900b
@ -700,6 +700,9 @@ class ApplicationPDF(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 Application.objects.exists(): # No applications existing
|
||||||
|
story.append(Paragraph(_("No applications existing."), stylesheet['Heading3']))
|
||||||
|
else: # Print all Applications
|
||||||
# List of applications
|
# List of applications
|
||||||
for application in Application.objects.order_by('number'):
|
for application in Application.objects.order_by('number'):
|
||||||
if application.number:
|
if application.number:
|
||||||
|
Loading…
Reference in New Issue
Block a user