summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvuko <vuko@hackerspace.pl>2020-06-13 17:03:48 +0200
committervuko <vuko@hackerspace.pl>2020-06-13 17:03:48 +0200
commit1287aec1b03246354e6917f71bdd7d7350ef1452 (patch)
tree91fc7ad6e6c9116304504ad40cfd9d7000a3c0fc
parent9c79dddb6fc59e3ae22c3211490a8bd68ae42f7f (diff)
downloadcheckinator-1287aec1b03246354e6917f71bdd7d7350ef1452.tar.gz
checkinator-1287aec1b03246354e6917f71bdd7d7350ef1452.tar.bz2
checkinator-1287aec1b03246354e6917f71bdd7d7350ef1452.zip
fix warnings in at/web.py
-rw-r--r--at/web.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/at/web.py b/at/web.py
index 288a5bc..a6c0023 100644
--- a/at/web.py
+++ b/at/web.py
@@ -1,12 +1,11 @@
import json
-import requests
import sqlite3
+from pathlib import Path
from datetime import datetime
from collections import namedtuple
-from urllib.parse import urlencode
from functools import wraps
from flask import Flask, render_template, abort, g, \
- redirect, request, flash, url_for, make_response
+ redirect, request, url_for, make_response
from .dhcp import DhcpdUpdater
@@ -51,7 +50,7 @@ def app(instance_path):
from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
- auth = SpaceAuth(app)
+ app.space_auth = SpaceAuth(app)
def restrict_ip(prefix='', exclude=[]):
def decorator(f):
@@ -236,5 +235,4 @@ def app(instance_path):
return app
if __name__ == '__main__':
- app.logger.setLevel(logging.DEBUG)
- app.run('0.0.0.0', 8080, debug=True)
+ app(Path.cwd().absolute()).run('0.0.0.0', 8080, debug=True)