Software Heritage uses Django in several packages: swh-auth, swh-deposit
When building global or local package documentation, the environment
variable DJANGO_SETTINGS_MODULE must be set to the adequate settings
module in order to avoid errors with sphinx autodoc processing.
Previous approach was merging swh-deposit and swh-web django settings
but it did not prevent all autodoc errors due to some missing or
unexpected django setting value.
New approach force reset Django settings according to the next rst
document to read by sphinx. This ensures adequate django settings
will be set for each swh packages before processing apidoc generated
It also enables to not depend on swh-deposit and swh-web for building
a local package documentation.
Depends on D5565
Related to T3258