add login logout route
This commit is contained in:
15
app.py
15
app.py
@@ -48,6 +48,16 @@ def index():
|
|||||||
return render_template("index.html", detals=getall)
|
return render_template("index.html", detals=getall)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/login')
|
||||||
|
def login():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/logout')
|
||||||
|
def logout():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
@app.route("/admin", methods=['GET', 'POST'])
|
@app.route("/admin", methods=['GET', 'POST'])
|
||||||
def admipage():
|
def admipage():
|
||||||
return render_template("adminpage.html")
|
return render_template("adminpage.html")
|
||||||
@@ -131,8 +141,6 @@ def updater():
|
|||||||
stl_file = request.files['stl']
|
stl_file = request.files['stl']
|
||||||
src_file = request.files['src']
|
src_file = request.files['src']
|
||||||
|
|
||||||
print(detal.id)
|
|
||||||
|
|
||||||
if len(image_file.filename) > 0:
|
if len(image_file.filename) > 0:
|
||||||
filename = image_file.filename.split('.')
|
filename = image_file.filename.split('.')
|
||||||
image_file.filename = secrets.token_hex(15) + '.' + filename[-1]
|
image_file.filename = secrets.token_hex(15) + '.' + filename[-1]
|
||||||
@@ -164,9 +172,6 @@ def updater():
|
|||||||
|
|
||||||
return redirect(url_for('editcadrd'))
|
return redirect(url_for('editcadrd'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "123"
|
return "123"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user