sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Fix #206 #208

Closed javierggt closed 2 years ago

javierggt commented 2 years ago

Description

PR #202 was made to enable importing kadi in subprocesses, as explained in #201, but that broke the local server functionality (#206). This PR is an attempt to fix that.

Testing

Fixes #206

taldcroft commented 2 years ago

This works for me. I don't like the use of a private attribute but (having played around for an hour) I don't see a better way.

BTW, in my testing the DJANGO_SETTINGS_MODULE test is not needed if _wrapped is checked. The only thing I didn't check is on the production Apache server. Maybe we can just leave either test to be conservative.

javierggt commented 2 years ago

I think the DJANGO_SETTINGS_MODULE test is not required in the apache server, so removing it would be ok.