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)
|
||||
|
||||
|
||||
@app.route('/login')
|
||||
def login():
|
||||
pass
|
||||
|
||||
|
||||
@app.route('/logout')
|
||||
def logout():
|
||||
pass
|
||||
|
||||
|
||||
@app.route("/admin", methods=['GET', 'POST'])
|
||||
def admipage():
|
||||
return render_template("adminpage.html")
|
||||
@@ -131,8 +141,6 @@ def updater():
|
||||
stl_file = request.files['stl']
|
||||
src_file = request.files['src']
|
||||
|
||||
print(detal.id)
|
||||
|
||||
if len(image_file.filename) > 0:
|
||||
filename = image_file.filename.split('.')
|
||||
image_file.filename = secrets.token_hex(15) + '.' + filename[-1]
|
||||
@@ -163,10 +171,7 @@ def updater():
|
||||
db.session.commit()
|
||||
|
||||
return redirect(url_for('editcadrd'))
|
||||
|
||||
|
||||
|
||||
|
||||
return "123"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user