We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb01ee1 commit f8a915eCopy full SHA for f8a915e
infinity/search.cgi
@@ -20,7 +20,8 @@ def index():
20
env = Environment(loader=FileSystemLoader('./', encoding='utf8'))
21
tpl = env.get_template('search.html')
22
word = cgi.FieldStorage().getvalue('word')
23
- params = {'results':search(word)}
+ results = search(word)
24
+ params = {'results':results,'count':len(results)}
25
html = tpl.render(params)
26
print('Content-Type: text/html; charset=utf-8\n')
27
print(html.encode('utf-8'))
infinity/search.html
@@ -17,6 +17,7 @@
17
</style>
18
</head>
19
<body>
+ {{ count }}件
{% for result in results %}
<img src="{{ result }}" />
{% endfor %}
0 commit comments