Add file upload for releases
This commit is contained in:
@@ -12,13 +12,18 @@ cache = SimpleCache()
|
||||
|
||||
@app.template_filter()
|
||||
def domain(url):
|
||||
return urlparse(url).netloc
|
||||
return urlparse(url).netloc
|
||||
|
||||
# TODO: remove on production!
|
||||
# Use nginx to serve files on production instead
|
||||
@app.route("/static/<path:path>")
|
||||
def send_static(path):
|
||||
return send_from_directory("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)
|
||||
|
||||
@app.route("/")
|
||||
@menu.register_menu(app, ".", "Home")
|
||||
def home_page():
|
||||
|
||||
Reference in New Issue
Block a user