Question: We are hosting our website in Azure. During the deployment(TFS) we will do the below Steps as the part of the deployment pipeline.

1. Stop the WebApp
2. Deploy Web App Service
3. Start the WebApp

After the 1st step, if anyone tries to access our website, then by default Azure will return the below page

[![enter image description here](https://i.stack.imgur.com/zXQzr.jpg)](https://i.stack.imgur.com/zXQzr.jpg)

We really don't want our users to show this page during the outage. We are planning to show our own outage image/page in such case.

Is there is any way to achieve this?

Since Azure Web Apps in a Paas model, I'm wondering how to do this?

Any inputs Appreciated!

Answer: 
Messing with `sys.path` is rarely a good idea.

Since your plan seems to be to use both `foo` and `test` from `notebooks` (that will probably just contain Jupyter notebooks), the cleanest solution would be to install `foo` and `test` as packages.

Remove the `__init__.py` from your top level directory and `notebooks`, since you will not want to import them. Then add a `setup.py` to your top level directory. Since your tests are specific to `foo`, you should either rename them `foo_test` or move them into `foo` itself.

A minimal `setup.py` would look like this

```
from setuptools import setup

setup(name='foo',
      version='0.1',
      description='descroption of fo',
      author='you',
      author_email='your@mail',
      packages=['foo','test_foo])

```

Then you can simply `pip install -e .` in your top level directory and it will be installed into your current virtualenv. If you are not using virtualenvs, you should `pip install --user -e .`
Are you using an IDE? If so add the path to the Python Interpreter inside the project Properties to all the primary packages (foo, test, notebooks). Otherwise try to explicitly add the bar package to the sys path like so 

```
import sys
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(MYDIR,'test'))
sys.path.append(os.path.join(MYDIR,'test/foo'))
sys.path.append(os.path.join(MYDIR,'test/foo/bar')) #I am not sure this is entirely needed

```