Skip to content

Commit f8a915e

Browse files
committed
件数復活
1 parent bb01ee1 commit f8a915e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

infinity/search.cgi

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def index():
2020
env = Environment(loader=FileSystemLoader('./', encoding='utf8'))
2121
tpl = env.get_template('search.html')
2222
word = cgi.FieldStorage().getvalue('word')
23-
params = {'results':search(word)}
23+
results = search(word)
24+
params = {'results':results,'count':len(results)}
2425
html = tpl.render(params)
2526
print('Content-Type: text/html; charset=utf-8\n')
2627
print(html.encode('utf-8'))

infinity/search.html

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
</style>
1818
</head>
1919
<body>
20+
{{ count }}件
2021
{% for result in results %}
2122
<img src="{{ result }}" />
2223
{% endfor %}

0 commit comments

Comments
 (0)