Skip to content

Commit b6fecfb

Browse files
committed
Moving attendee barcodes to pure python generator
1 parent f6bb23d commit b6fecfb

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
alembic==0.9.1
22
authorizenet==1.1.4
3+
aztec-code-generator==0.11
34
bleach==4.1.0
45
boto3==1.14.45
56
celery==5.1.2

uber/site_sections/registration.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pockets.autolog import log
1010

1111
import cherrypy
12-
import treepoem
12+
from aztec_code_generator import AztecCode
1313
from pytz import UTC
1414
from six import string_types
1515
from sqlalchemy import and_, func, or_
@@ -375,11 +375,7 @@ def qrcode_generator(self, data):
375375
this function. Or, offload image generation to a dedicated microservice that replicates this functionality.
376376
377377
"""
378-
checkin_barcode = treepoem.generate_barcode(
379-
barcode_type='azteccode',
380-
data=c.EVENT_QR_ID + str(data),
381-
options={},
382-
)
378+
checkin_barcode = AztecCode(c.EVENT_QR_ID+str(data), size=(27, True)).image(module_size=4, border=1)
383379
buffer = BytesIO()
384380
checkin_barcode.save(buffer, "PNG")
385381
buffer.seek(0)

0 commit comments

Comments
 (0)