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()
|
||||
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)
|
||||
for i in set_list:
|
||||
try:
|
||||
@ -341,7 +345,7 @@ def index():
|
||||
|
||||
cursor.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':
|
||||
set_num = request.form.get('set_num')
|
||||
|
@ -162,7 +162,7 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<div class="search-container">
|
||||
<input class="input"type="text" id="searchInput" onkeyup="searchFunction()" placeholder="Search...">
|
||||
<!-- <center hidden="true">
|
||||
@ -250,11 +250,15 @@
|
||||
Set is collected and boxed
|
||||
</label>
|
||||
<br>
|
||||
<fieldset disabled>
|
||||
<!-- <fieldset disabled> -->
|
||||
<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>
|
||||
</fieldset>
|
||||
<!-- </fieldset> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user