diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 50f3a525d..69d96cbc8 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -826,8 +826,14 @@ class ReciboProposicaoView(TemplateView): # FIXME hash para textos articulados _hash = 'P' + ta.hash() + '/' + str(proposicao.id) + from sapl.utils import create_barcode + base64_data = create_barcode(_hash, 100, 2000) + barcode = 'data:image/png;base64,{0}'.format(base64_data) + + context.update({'proposicao': proposicao, - 'hash': _hash}) + 'hash': _hash, + 'barcode': barcode}) return context def get(self, request, *args, **kwargs): diff --git a/sapl/templates/materia/recibo_proposicao.html b/sapl/templates/materia/recibo_proposicao.html index a2ec81039..a839250f9 100644 --- a/sapl/templates/materia/recibo_proposicao.html +++ b/sapl/templates/materia/recibo_proposicao.html @@ -67,5 +67,6 @@