|
|
@@ -12,8 +12,19 @@ bp = Blueprint('home', __name__)
|
|
12
|
12
|
def index():
|
|
13
|
13
|
db = get_db()
|
|
14
|
14
|
fronters = db.execute("SELECT * FROM member WHERE front=(?)",(1,)).fetchall()
|
|
|
15
|
+ homepage = db.execute("SELECT * FROM member WHERE homepage=(?)",(1,)).fetchall()
|
|
15
|
16
|
|
|
16
|
|
- return render_template('index.html', front_list=fronters)
|
|
|
17
|
+ icons={}
|
|
|
18
|
+ for member in homepage:
|
|
|
19
|
+ icon_id = member[6]
|
|
|
20
|
+ if icon_id:
|
|
|
21
|
+ icon = db.execute("SELECT icon_location FROM icons WHERE id=(?)",(icon_id,)).fetchone()
|
|
|
22
|
+ if icon:
|
|
|
23
|
+ icons[member[0]] = icon[0]
|
|
|
24
|
+ else:
|
|
|
25
|
+ icons[member[0]] = None
|
|
|
26
|
+
|
|
|
27
|
+ return render_template('index.html', front_list=fronters, home_pins=homepage, icons=icons)
|
|
17
|
28
|
|
|
18
|
29
|
@bp.route('/full')
|
|
19
|
30
|
def full_list():
|
|
|
@@ -29,6 +40,5 @@ def full_list():
|
|
29
|
40
|
icons[member[0]] = icon[0]
|
|
30
|
41
|
else:
|
|
31
|
42
|
icons[member[0]] = None
|
|
32
|
|
- print(icons)
|
|
33
|
43
|
|
|
34
|
44
|
return render_template('full.html', memberlist=members, icons=icons)
|