diff --git a/src/main.py b/src/main.py index ddd638c..2a8a38f 100644 --- a/src/main.py +++ b/src/main.py @@ -1,7 +1,7 @@ from jinja2 import Environment, FileSystemLoader from bottle import route, run import bottle - +import random JINJA_ENV = Environment( loader=FileSystemLoader('templates/'), @@ -15,6 +15,15 @@ def say_hi(name): 'name': name }) +@route('/image') +def show_image(): + return respond('image.html', + { + 'red': random.randint(0,255), + 'green': random.randint(0,255), + 'blue': random.randint(0,255) + }) + @route('/static/') def serve_asset(asset): diff --git a/static/bronco.png b/static/bronco.png new file mode 100644 index 0000000..1191fec Binary files /dev/null and b/static/bronco.png differ diff --git a/static/rainbowkitten.jpg b/static/rainbowkitten.jpg new file mode 100644 index 0000000..666b8f8 Binary files /dev/null and b/static/rainbowkitten.jpg differ diff --git a/templates/image.html b/templates/image.html new file mode 100644 index 0000000..5f88ccb --- /dev/null +++ b/templates/image.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file