-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyman.py
52 lines (33 loc) · 1.06 KB
/
pyman.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from flask import Flask, render_template,request, redirect, request, url_for, flash, g, Blueprint
from markupsafe import escape
from datetime import datetime
from dbconnect import connection
app = Flask(__name__)
bp = Blueprint('blog', __name__)
# @app.route('/', methods=['GET', 'POST'])
# def index():
# try:
# c, conn = connection()
# return "all good"
# except Exception as e:
# return(str(e))
@app.route('/', methods=['GET', 'POST'])
def index():
from indexm import indexm
return indexm()
#@app.route('/list', methods=['GET', 'POST'])
#def lists():
# c,conn = connection()
# c.execute('SELECT m_chapter, manga_url '
# ' FROM manga_chapter'
#' WHERE manga_id=1'
# )
# posts = c.fetchall()
# conn.close()
# return render_template('blog/index.html', posts=posts)
@app.route('/test/<value1>', methods=['GET', 'POST'])
def test(value1):
value1 = value1
return render_template('blog/index.html', posts= 'value1 : %s ' % value1)
if __name__ == '__main__':
app.run(debug=True)