import os

from flask import Flask
app = Flask(__name__)


@app.route("/")
def hello():
    return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')

import os

from flask import Flask, send_from_directory
app = Flask(__name__)


@app.route("/")
def hello():
    return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')


@app.route("/parrots/<path:path>")
def parrot(path):
    return send_from_directory(os.path.join('parrots', 'parrots'), path)

Add a route to send parrot images
Add a route to send parrot images

  import os
  
- from flask import Flask
+ from flask import Flask, send_from_directory
  app = Flask(__name__)
  
  
  @app.route("/")
  def hello():
      return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
  
+ 
+ @app.route("/parrots/<path:path>")
+ def parrot(path):
+     return send_from_directory(os.path.join('parrots', 'parrots'), path)
+ 
Add a route to send parrot images
## Code Before:
import os

from flask import Flask
app = Flask(__name__)


@app.route("/")
def hello():
    return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')

## Instruction:
Add a route to send parrot images
## Code After:
import os

from flask import Flask, send_from_directory
app = Flask(__name__)


@app.route("/")
def hello():
    return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')


@app.route("/parrots/<path:path>")
def parrot(path):
    return send_from_directory(os.path.join('parrots', 'parrots'), path)
