How to change barcode format
kevxlreee opened this issue · 2 comments
kevxlreee commented
How to change the barcode format to something other than the default PDF417?
If I do passfile.barcode = Barcode(message = 'message', format=BarcodeFormat.CODE128)
I get a NameError - name 'BarcodeFormat' is not defined.
Sorry for my noob question :)
mbaechtold commented
Did you import the class BarcodeFormat
?
from passbook.models import BarcodeFormat
If you did, could you please provide a more complete example of your code?
kevxlreee commented
Oops...I hadn't imported that class. It works now :)
Thanks for your help!