f
This commit is contained in:
parent
c873616f04
commit
885c07d0ba
4
app.py
4
app.py
@ -13,7 +13,7 @@ app.secret_key = hashlib.md5(os.urandom(32)).hexdigest()
|
|||||||
def parsetime(value):
|
def parsetime(value):
|
||||||
return time.strftime('%Y-%m-%d %H:%M', time.localtime(value))
|
return time.strftime('%Y-%m-%d %H:%M', time.localtime(value))
|
||||||
|
|
||||||
@app.route('/gb')
|
@app.route('/g')
|
||||||
def index():
|
def index():
|
||||||
statement = 'SELECT "id", "name", "website", "comment", "date", "ip" FROM "entries" ORDER BY id DESC'
|
statement = 'SELECT "id", "name", "website", "comment", "date", "ip" FROM "entries" ORDER BY id DESC'
|
||||||
cs.execute(statement)
|
cs.execute(statement)
|
||||||
@ -24,7 +24,7 @@ def index():
|
|||||||
print(sites)
|
print(sites)
|
||||||
return render_template("index.html", comments=comments, sites=sites)
|
return render_template("index.html", comments=comments, sites=sites)
|
||||||
|
|
||||||
@app.route('/gb/submit', methods=["POST"])
|
@app.route('/submit', methods=["POST"])
|
||||||
def submit():
|
def submit():
|
||||||
errors = []
|
errors = []
|
||||||
name = request.form.get("name")
|
name = request.form.get("name")
|
||||||
|
Loading…
Reference in New Issue
Block a user