diff --git a/pinaxcon/templates/symposion/dashboard/_categories.html b/pinaxcon/templates/symposion/dashboard/_categories.html index 60011c25..1dc96b01 100644 --- a/pinaxcon/templates/symposion/dashboard/_categories.html +++ b/pinaxcon/templates/symposion/dashboard/_categories.html @@ -66,6 +66,9 @@ {% flag "badge_preview" %} Preview my badge {% endflag %} + {% flag "view_boardingpass" %} + View Boarding Pass + {% endflag %}
diff --git a/requirements.txt b/requirements.txt index e685351a..9a1d1c56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,6 +44,9 @@ pinax-stripe==4.4.0 requests==2.24.0 stripe==2.55.0 +# Regidesk +python-barcode==0.15.1 + # SASS Compiler and template tags libsass==0.20.1 django-sass-processor==0.8.2 diff --git a/vendor/regidesk/regidesk/models.py b/vendor/regidesk/regidesk/models.py index 846d3210..372e38a1 100644 --- a/vendor/regidesk/regidesk/models.py +++ b/vendor/regidesk/regidesk/models.py @@ -17,6 +17,8 @@ from django.db.models import Count from django.db.models.signals import post_save from django.contrib.auth import get_user_model import pyqrcode +from barcode import Code128 +from barcode.writer import ImageWriter from symposion import constants from symposion.text_parser import parse @@ -155,6 +157,19 @@ class CheckIn(models.Model): return self._checkin_code_png + @property + def barcode(self): + """Generates a Code 128 barcode of the checkin code. + + Returns the base64 encoded raw PNG blob for the barcode. + """ + barcode = Code128(self.code, writer=ImageWriter()) + barcode_io = BytesIO() + barcode.write(barcode_io) + barcode_io.seek(0) + b64_barcode = base64.b64encode(barcode_io.read()).decode('UTF-8') + return b64_barcode + @property def venueless_token(self): """Returns the Venueless JWT token for this checkin's code.""" diff --git a/vendor/regidesk/regidesk/templates/regidesk/_bp_prepare_help.html b/vendor/regidesk/regidesk/templates/regidesk/_bp_prepare_help.html index 1385b679..3974412d 100644 --- a/vendor/regidesk/regidesk/templates/regidesk/_bp_prepare_help.html +++ b/vendor/regidesk/regidesk/templates/regidesk/_bp_prepare_help.html @@ -2,8 +2,9 @@ specific to each proposal: