def server_static(filepath):
"""Serves static assets from the directory `equitas/static`.
This supports returning static files from subdirectories within that
directory. For example, it allows you to return css stylesheets or even
javascript files from those directories. For example, in your HTML, you can
have the following:
<script src="/static/scripts/something/something_else.js"></script>
And this would return the script within
`equitas/static/scripts/something/something_else`.
"""
this_directory = os.path.dirname(os.path.abspath(__file__))
static_directory = os.path.join(this_directory, 'anxiety', 'static')
return static_file(filepath, root=static_directory)
################################################################################
# API for JSON requests
################################################################################
评论列表
文章目录