Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
Adding a route to route static file in app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Barreto Volpone committed Dec 2, 2016
1 parent 982de29 commit 40fdd7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/simple_note/app.py
Expand Up @@ -2,6 +2,8 @@
from playhouse.shortcuts import dict_to_model, model_to_dict # peewee
import peewee

from bottle import static_file

from datetime import datetime

from ray.authentication import Authentication, register
Expand Down Expand Up @@ -155,6 +157,11 @@ class Profile(object):
DEFAULT = 'default'


@application.route('/static/<filepath:path>')
def server_static(filepath):
return static_file(filepath, root='static')


if __name__ == '__main__':
database.connect()
database.create_tables([User, Notebook, Note], safe=True)
Expand Down

0 comments on commit 40fdd7e

Please sign in to comment.