From 0bc4ae56611d067fb894c769adbebaf616947869 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Wed, 27 Aug 2025 15:40:50 -0300 Subject: [PATCH] Fix PDF report crash --- requirements/requirements.txt | 4 +++- sapl/materia/urls.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index eff013303..e331aac57 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -5,6 +5,7 @@ Django==4.2.23 django-haystack==3.3.0 django-filter==24.3 djangorestframework==3.15.2 +drf-spectacular==0.28.0 django-crispy-forms==2.4 crispy-bootstrap4==2024.1 @@ -20,8 +21,10 @@ easy-thumbnails==2.9.0 # Images / files / PDF django-image-cropping==1.7.0 Pillow==10.3.0 +trml2pdf==0.6 weasyprint==66.0 PyPDF4==1.27.0 +rlPyCairo==0.4.0 # Frontend integration django-webpack-loader==1.6.0 # (works; keep unless you’re moving to webpack5 forks) @@ -50,7 +53,6 @@ XlsxWriter==3.2.0 # Custom / VCS deps you already use git+https://github.com/infrae/pyoai@5ff2f15e869869e70d8139e4c37b7832854d7049 -git+https://github.com/interlegis/trml2pdf git+https://github.com/interlegis/django-admin-bootstrapped # REMOVE this old backport package completely (Django ships postgres contrib): diff --git a/sapl/materia/urls.py b/sapl/materia/urls.py index 1df7af967..bab4d11fe 100644 --- a/sapl/materia/urls.py +++ b/sapl/materia/urls.py @@ -142,8 +142,7 @@ urlpatterns_proposicao = [ name='proposicao-recebida'), re_path(r'^proposicao/devolvida/', ProposicaoDevolvida.as_view(), name='proposicao-devolvida'), - re_path(r'^proposicao/confirmar/P(?P[0-9A-Fa-f]+)/' - '(?P\d+)', ConfirmarProposicao.as_view(), + re_path(r'^proposicao/confirmar/P(?P[0-9A-Fa-f]+)/(?P\d+)', ConfirmarProposicao.as_view(), name='proposicao-confirmar'), path('sistema/proposicao/tipo/', include(TipoProposicaoCrud.get_urls())),