T34559 migrate to 16 alpha#116
Conversation
2d5660c to
83ede9c
Compare
049a769 to
9de0b71
Compare
9de0b71 to
82b4293
Compare
|
|
||
| logger.info("Applying DynamicWhiteNoise workarounds") | ||
| kolibri_whitenoise.DynamicWhiteNoise = DynamicWhiteNoise | ||
| kolibri_whitenoise.DynamicWhiteNoise = AndroidDynamicWhiteNoise |
There was a problem hiding this comment.
The alternative to monkey patching this is to just define your own WSGI application instead, I would think, which may feel neater? Might be a few more lines of code though.
There was a problem hiding this comment.
Yeah, I should play with that properly :) The reason I didn't here is because Kolibri's wsgi.py has a fair bit of stuff in it. Looking at it again, it doesn't change very frequently, so not really that scary, and it would indeed make the rest of it simpler.
There was a problem hiding this comment.
Okay, I gave it a try in #121. I agree, I like it better that way 👍
e3910ca to
8de6e78
Compare
| from .android_utils import stat_file | ||
|
|
||
| # We import from evil_kolibri so we can monkey-patch DynamicWhiteNoise from | ||
| # kolibri without creating a circular dependency. |
There was a problem hiding this comment.
I don't see anything that installs an evil_kolibri package. Did I miss something?
There was a problem hiding this comment.
Oops, good catch! I forgot to commit that. Fixed now in the newest version of this commit, with some new stuff added to the Makefile: copying some code from kolibri to evil_kolibri, and applying the patch I had added.
By adding a patch to lightly refactor kolibri_whitenoise, we can change android_whitenoise to use a subclass of DynamicWhiteNoise. It is still necessary to copy DynamicWhiteNoise in order to subclass it, because the same class in Kolibri itself needs to be monkey-patched with our version. However, that copy can now be created automatically. https://phabricator.endlessm.com/T34559
8de6e78 to
90501bc
Compare
dbnicholson
left a comment
There was a problem hiding this comment.
I trust this does the right thing and the copying is necessary.
Please merge this together with endlessm/kolibri-explore-plugin#520.
https://phabricator.endlessm.com/T34559