openwisp / django-freeradius

Administration web interface and REST API for freeradius 3 build in django & python, development has moved to openwisp-radius
http://openwisp-radius.readthedocs.io
Other
365 stars 87 forks source link

[Improvement] Migrate html2pdf to weasyprint #257

Closed nikitaermishin closed 4 years ago

nikitaermishin commented 4 years ago

PR for improvement commit, which makes a migration from html2pdf to weasyprint. Changes:

Closes #243

nikitaermishin commented 4 years ago

@nemesisdesign The problem is about providing base_url to HTML function. base_url should provide absolute path to the folder, which contains our css and js files. I suppose we could do it by some better way (including fix of STATIC_URL value mistake). So I can compose BATCH_PDF_TEMPLATE_BASE_URL of absolute way to django_freeradius folder and STATIC_URL variable. Will provide commit soon, so you will have opportunity to understand what I am talking about. :smiley:

nikitaermishin commented 4 years ago

I think this weasyprint>=43,<=44 should be weasyprint>=44,<45

@2stacks It has no other versions between 44 and 45, so isn't that the same as weasyprint==44? If so, could I use any of them?

2stacks commented 4 years ago

I think this weasyprint>=43,<=44 should be weasyprint>=44,<45

@2stacks It has no other versions between 44 and 45, so isn't that the same as weasyprint==44? If so, could I use any of them?

Yes, they all achieve the same thing. However, if you look at the current file, my RFC is purely based on consistency. At some point 44 will be the supported lower bound and some future 4x will be the upper bound.

nikitaermishin commented 4 years ago

@nemesisdesign Ok, rebased my branch. Now working on the problem :smiley:

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 99.927% when pulling 8e1d7de1bc89dc5e75fcfdd6c34fb4ee93c9c8d3 on nikitaermishin:migrate_to_weasyprint into c8587d64e42bc5675d026e4409c3599413366cfd on openwisp:master.

nemesifier commented 4 years ago

PS: please also rebase on the current master.