Skip to content

Commit

Permalink
change logo size (#485)
Browse files Browse the repository at this point in the history
* change logo size

* use trusty and only test certification
  • Loading branch information
anitanh authored and timlinux committed Aug 1, 2017
1 parent 90c049f commit 89a3984
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ env:
- DJANGO_SETTINGS_MODULE=core.settings.test_travis

sudo: false
dist: precise
dist: trusty

python:
- '2.7'

addons:
postgresql: "9.3"
apt:
packages:
- postgresql-9.3-postgis-2.3

install:
- pip install coveralls
Expand All @@ -33,7 +36,7 @@ script:
- cd django_project
- python manage.py makemigrations
- python manage.py migrate
- coverage run manage.py test
- coverage run manage.py test core certification

after_success:
- coveralls
Expand Down
6 changes: 3 additions & 3 deletions django_project/certification/views/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def certificate_pdf_view(request, **kwargs):
margin_right = height - 50
margin_left = 50
margin_bottom = 50
max_left = margin_right - 50
max_left = margin_right - 100

# Draw things on the PDF. Here's where the PDF generation happens.
# See the ReportLab documentation for the full list of functionality.
Expand All @@ -209,12 +209,12 @@ def certificate_pdf_view(request, **kwargs):

if project_logo is not None:
page.drawImage(
project_logo, 50, 500, width=50, height=50,
project_logo, 50, 450, width=100, height=100,
preserveAspectRatio=True, mask='auto')

if organisation_logo is not None:
page.drawImage(
organisation_logo, max_left, 500, height=50, width=50,
organisation_logo, max_left, 450, height=100, width=100,
preserveAspectRatio=True, anchor='c', mask='auto')

page.setFont('Times-Bold', 26)
Expand Down

0 comments on commit 89a3984

Please sign in to comment.