.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from flask_login import UserMixin
|
||||
from flask_table import Col, Table
|
||||
from flask_table import Col, Table, LinkCol
|
||||
|
||||
# from sqlalchemy.ext.declarative.api import instrument_declarative
|
||||
from werkzeug.security import check_password_hash, generate_password_hash
|
||||
@@ -33,6 +33,7 @@ class Networks(Table):
|
||||
signal = Col("Signal Strength")
|
||||
inuse = Col("Connected")
|
||||
security = Col("Security")
|
||||
connect = LinkCol("Connect", "connect", url_kwargs=dict(ssid="ssid"))
|
||||
|
||||
|
||||
class Network(object):
|
||||
|
||||
@@ -45,3 +45,9 @@ def login():
|
||||
def logout():
|
||||
logout_user()
|
||||
return redirect(url_for("index"))
|
||||
|
||||
|
||||
@app.route("/<string:ssid>", methods=["GET", "POST"])
|
||||
@login_required
|
||||
def connect(ssid):
|
||||
return "Connect {}".format(ssid)
|
||||
|
||||
Reference in New Issue
Block a user