diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-23 21:12:52 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-23 21:15:21 +0100 |
| commit | d5342d7096e8bb568f1af7bdc9200b03537bb9fc (patch) | |
| tree | b59e4d6a9b0b8c289cec58b597c9fccbba15e8cd /app/views | |
| parent | 59f75bb71c361ae442febf3666838ef055849c30 (diff) | |
| download | cheatdb-d5342d7096e8bb568f1af7bdc9200b03537bb9fc.tar.xz | |
Move static and uploads to public dir
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/__init__.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py index 38ebdfd..924dc67 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -34,12 +34,11 @@ def domain(url): # Use nginx to serve files on production instead @app.route("/static/<path:path>") def send_static(path): - return send_from_directory("static", path) + return send_from_directory("public/static", path) @app.route("/uploads/<path:path>") def send_upload(path): - import os - return send_from_directory(os.path.abspath(app.config["UPLOAD_FOLDER"]), path) + return send_from_directory("public/uploads", path) @app.route("/") @menu.register_menu(app, ".", "Home") |
