(Note: This is a WIP PR that is currently being tested and I will update the status once the changes are confirmed to work.)
`django-storages` 1.8 throws an error when the storage location path for an S3 bucket starts with a leading `/`. (Reported in (https://openedx.atlassian.net/browse/CRI-206)). This happens because `edxapp_media_dir` used as the default value of the `location` parameter and it has a default value of `/edx/var/edxapp/media`. The older versions of `django-storages` automatically translated `/edx/var/edxapp/media` to the path `edx/var/edxapp/media` on the S3 buckets. But in 1.8 they raise an `ImproperlyConfigured` exception ([code](https://github.com/jschneier/django-storages/blob/1.8/storages/utils.py#L82)).
This PR attempts to fix this issue by removing the leading `/` from the variable passed to the `location` parameters.
Reference: [discussion on Slack](https://openedx.slack.com/archives/CSAC4QHC7/p1589971174063800)
Configuration Pull Request
Make sure that the following steps are done before merging:
[ ] A DevOps team member has approved the PR if it is code shared across multiple services and you don't own all of the services.
[ ] Are you adding any new default values that need to be overridden when this change goes live? If so:
[ ] Update the appropriate internal repo (be sure to update for all our environments)
[ ] If you are updating a secure value rather than an internal one, file a DEVOPS ticket with details.
[ ] Add an entry to the CHANGELOG.
[ ] If you are making a complicated change, have you performed the proper testing specified on the [Ops Ansible Testing Checklist](https://openedx.atlassian.net/wiki/display/EdxOps/Ops+Ansible+Testing+Checklist)? Adding a new variable does not require the full list (although testing on a sandbox is a great idea to ensure it links with your downstream code changes).
[ ] Think about how this change will affect Open edX operators. Have you updated the wiki page for the next Open edX release?