Skip to content

Commit

Permalink
updating models and certificate generation
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsochat@stanford.edu>
  • Loading branch information
vsoch committed Sep 9, 2020
1 parent 0552742 commit 59fa340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion mhttc/apps/main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class Meta:
unique_together = [["name", "center"]]



class TrainingParticipant(models.Model):
"""A training participant is an email address (and status?) to indicate
the status for a participant.
Expand Down
8 changes: 4 additions & 4 deletions mhttc/apps/main/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ def make_certificate_response(name, training, image_path=None):

# Participant Name Text
c.setFont("Helvetica-Bold", 24, leading=None)
c.drawCentredString(480, 300, name)
c.drawCentredString(480, 245, name)

# More body Text ...
c.setFont("Helvetica", 20, leading=None)
c.drawCentredString(480, 200, training.name)
c.drawCentredString(480, 150, training.name)

# If we have dates of event and duration, add to bottom left
c.setFont("Helvetica", 12, leading=None)
if training.dates:
c.drawCentredString(480, 30, "Date of Event: %s" % training.dates)
c.drawCentredString(480, 120, "Date of Event: %s" % training.dates)
if training.duration:
c.drawCentredString(480, 20, "Duration: %s" % training.duration)
c.drawCentredString(480, 100, "Duration: %s" % training.duration)

c.save()
return response

0 comments on commit 59fa340

Please sign in to comment.