mirror of https://github.com/dirtbags/moth.git
devel server: say whether files are visible or not
This commit is contained in:
parent
92d94137a6
commit
6906903ef4
|
@ -159,9 +159,16 @@ you are a fool.
|
||||||
body.write(puzzle.html_body())
|
body.write(puzzle.html_body())
|
||||||
body.write("<h2>Files</h2>")
|
body.write("<h2>Files</h2>")
|
||||||
body.write("<ul>")
|
body.write("<ul>")
|
||||||
for name in puzzle.files:
|
for name,puzzlefile in sorted(puzzle.files.items()):
|
||||||
body.write('<li><a href="/puzzles/{cat}/{points}/{filename}">{filename}</a></li>'
|
if puzzlefile.visible:
|
||||||
.format(cat=parts[2], points=puzzle.points, filename=name))
|
visibility = 'listed as a generated file'
|
||||||
|
else:
|
||||||
|
visibility = 'unlisted'
|
||||||
|
body.write('<li><a href="/puzzles/{cat}/{points}/{filename}">{filename}</a> ({visibility})</li>'
|
||||||
|
.format(cat=parts[2],
|
||||||
|
points=puzzle.points,
|
||||||
|
filename=name,
|
||||||
|
visibility=visibility))
|
||||||
body.write("</ul>")
|
body.write("</ul>")
|
||||||
body.write("<h2>Answers</h2>")
|
body.write("<h2>Answers</h2>")
|
||||||
body.write("<ul>")
|
body.write("<ul>")
|
||||||
|
|
Loading…
Reference in New Issue