aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/__init__.py2
-rw-r--r--app/views/__init__.py5
2 files changed, 1 insertions, 6 deletions
diff --git a/app/__init__.py b/app/__init__.py
index a6d15ce..8b7dd6a 100644
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -25,7 +25,7 @@ from flask_wtf.csrf import CsrfProtect
from flask_flatpages import FlatPages
import os
-app = Flask(__name__)
+app = Flask(__name__, static_folder="public/static")
app.config["FLATPAGES_ROOT"] = "flatpages"
app.config["FLATPAGES_EXTENSION"] = ".md"
app.config.from_pyfile(os.environ["FLASK_CONFIG"])
diff --git a/app/views/__init__.py b/app/views/__init__.py
index 37474de..a296e5d 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -31,11 +31,6 @@ cache = SimpleCache()
def domain(url):
return urlparse(url).netloc
-# Use nginx to serve files on production instead
-@app.route("/static/<path:path>")
-def send_static(path):
- return send_from_directory("public/static", path)
-
@app.route("/uploads/<path:path>")
def send_upload(path):
return send_from_directory("public/uploads", path)