|
@@ -126,8 +126,10 @@ def edit_time(alarmid):
|
|
|
"add_time_kind.html", form=form, kind=kind, mode="edit", alarmid=alarmid
|
|
|
)
|
|
|
|
|
|
+
|
|
|
def is_xhr():
|
|
|
- return request.headers.get('x-requested-with') is not None
|
|
|
+ return request.headers.get("x-requested-with") is not None
|
|
|
+
|
|
|
|
|
|
@db.route("/add/time/<kind>", methods=["GET", "POST"])
|
|
|
def addtime_kind(kind):
|
|
@@ -249,9 +251,9 @@ def delete_alarm(alarmid):
|
|
|
return redirect(url_for("db.events_list"))
|
|
|
|
|
|
|
|
|
-@db.route("/quick/<path:relpath>")
|
|
|
+@db.route("/extra/<path:relpath>")
|
|
|
def static_custom(relpath):
|
|
|
- basepath = get_conf()['EXTRA_STATIC_PATH']
|
|
|
+ basepath = get_conf()["EXTRA_STATIC_PATH"]
|
|
|
if not basepath:
|
|
|
abort(405)
|
|
|
fpath = os.path.join(basepath, relpath)
|
|
@@ -259,4 +261,4 @@ def static_custom(relpath):
|
|
|
if not os.path.isfile(fpath):
|
|
|
abort(404, "File non trovato")
|
|
|
mime, _encoding = mimetypes.guess_type(fpath)
|
|
|
- return Response(open(fpath, 'rb').read(), mimetype=mime)
|
|
|
+ return Response(open(fpath, "rb").read(), mimetype=mime)
|