Missing bricks on index
This commit is contained in:
parent
db032cd37f
commit
5e03013bef
6
app.py
6
app.py
@ -331,6 +331,10 @@ def index():
|
|||||||
results = cursor.fetchall()
|
results = cursor.fetchall()
|
||||||
set_list = [list(i) for i in results]
|
set_list = [list(i) for i in results]
|
||||||
|
|
||||||
|
cursor.execute('SELECT DISTINCT u_id from missing;')
|
||||||
|
results = cursor.fetchall()
|
||||||
|
missing_list = [list(i)[0] for i in results]
|
||||||
|
|
||||||
#print(set_list)
|
#print(set_list)
|
||||||
for i in set_list:
|
for i in set_list:
|
||||||
try:
|
try:
|
||||||
@ -341,7 +345,7 @@ def index():
|
|||||||
|
|
||||||
cursor.close()
|
cursor.close()
|
||||||
conn.close()
|
conn.close()
|
||||||
return render_template('index.html',set_list=set_list,themes_list=theme_file)
|
return render_template('index.html',set_list=set_list,themes_list=theme_file,missing_list=missing_list)
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
set_num = request.form.get('set_num')
|
set_num = request.form.get('set_num')
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<div class="search-container">
|
<div class="search-container">
|
||||||
<input class="input"type="text" id="searchInput" onkeyup="searchFunction()" placeholder="Search...">
|
<input class="input"type="text" id="searchInput" onkeyup="searchFunction()" placeholder="Search...">
|
||||||
<!-- <center hidden="true">
|
<!-- <center hidden="true">
|
||||||
@ -250,11 +250,15 @@
|
|||||||
Set is collected and boxed
|
Set is collected and boxed
|
||||||
</label>
|
</label>
|
||||||
<br>
|
<br>
|
||||||
<fieldset disabled>
|
<!-- <fieldset disabled> -->
|
||||||
<label class="checkbox" >
|
<label class="checkbox" >
|
||||||
<input type="checkbox" class="s_com" onclick="return false;"/> Set is missing pieces
|
{% if i[11] in missing_list %}
|
||||||
|
<input type="checkbox" class="s_com" onclick="return false;" checked/> Set is missing pieces
|
||||||
|
{% else %}
|
||||||
|
<input type="checkbox" class="s_com" onclick="return false;"/> Set is missing pieces
|
||||||
|
{% endif %}
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
<!-- </fieldset> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user