M boggle.py => boggle.py +5 -3
@@ 566,10 566,12 @@ def request_data(form, files):
filename = upload.filename.replace("'","") #filter out '
destination = IMAGE_UPLOAD_DIR + filename
i=0
- while os.path.exists(destination):
- spl = os.path.splitext(destination)
- destination = spl[0] + "_" + str(i) + spl[1]
+ destination_extra = destination
+ spl = os.path.splitext(destination)
+ while os.path.exists(destination_extra):
+ destination_extra = spl[0] + "_" + str(i) + spl[1]
i += 1
+ destination = destination_extra
# save file
print("File saved to to:", destination)
upload.save(destination)
M templates/boggle/upload.html => templates/boggle/upload.html +1 -0
@@ 92,6 92,7 @@
</div>
</div>
<div class="rightCol">
+ <p style="text-align: center" v-if="board != undefined">tap/click on the letters that are wrong to change them</p>
<table id="board" v-if="board != undefined" class="boggleBoard noselect">
<tbody>
<tr v-for="(row, i) in board">