Lazily load the `attachment_upload_to` configuration setting
In our project structure we can't simply import a function into our settings file to use within the SUMMERNOTE_CONFIG - trying to import a function before the project has been initialised simply doesn't work. In our specific case we import settings from environment variables and use a multiple settings files per environment which complicates things further.
This PR changes the attachment_upload_to to accept the dot notation to the file to be used, which is then loaded when it's needed.
This is a breaking change so I could work some backwards compatibility in to this if it's something you'd like to use in master?
Coverage decreased (-1.9%) to 96.656% when pulling 0323284d854c3eaf4062245360227d9570955e00 on workshoptech:master into f5f34de58443a880e2fc2bce0baf616d591dfeee on summernote:master.
Coverage decreased (-1.9%) to 96.644% when pulling 6f3479044a9f42d9a5e05f8640a5f71729a81929 on workshoptech:master into 5bcd829736b2b21d77d619b830c2901f450d5071 on summernote:master.
Thank you for contribution, @djw27.
We can make it without breaking backward compatibilties by detecting the type of attachment_upload_to. Could you make it uses get_by_qname only when a string has given to the config?
And it would be much appreciated if you can also provide a test for it. Thanks.