DH-IT-Portal-Development / ethics

Ethical Committee web application in Django
http://fetc.hum.uu.nl
MIT License
2 stars 1 forks source link

Incorporate non-standard proposal in pdf workflow #574

Closed EdoStorm96 closed 1 year ago

EdoStorm96 commented 1 year ago

Fix for issue #572. I got rid of now obsolete pdf templates and made sure the pre-assessment and pre-approval proposals are properly incorporated in the new PDF workflow.

Maybe the pdf_template_name function can be removed entirely? I guess it is not being used in this version. What do y'all think?

@tymees I did notice that the change to https in the handle_field_file function of the RowValueClass causes an error in my browser when clicking links in the pdf, with the error code: SSL_ERROR_RX_RECORD_TOO_LONG

However, Django tells me this is because the development server only support http:

You're accessing the development server over HTTPS, but it only supports HTTP.

So it will be fine on the production server?

tymees commented 1 year ago

@tymees I did notice that the change to https in the handle_field_file function of the RowValueClass causes an error in my browser when clicking links in the pdf, with the error code: SSL_ERROR_RX_RECORD_TOO_LONG

However, Django tells me this is because the development server only support http:

You're accessing the development server over HTTPS, but it only supports HTTP.

So it will be fine on the production server?

I'll look at this PR tomorrow in-depth. But for now:

Yeah, it's because local dev doesn't have https. Normally, you'd solve this by retrieving the used protocol (http vs https) from the request object; but PDF gen doesn't (always) have access to that.

It will be fine on the server, those are HTTPS only. You could maybe create an if on the DEBUG setting, but I don't have any strong opinions tbh