def catch_hash_page(some_hash):
if ip_in_db(request.remote_addr):
if some_hash in image_mappings:
image = 'Banned!<p></p><img src="images/{}">'\
.format(image_mappings[some_hash])
return render_template(
"index.html", content={"link": "", "text": image})
else:
return render_template(
"index.html", content={"link": "", "text": "wrong way:("})
add_ip(request.remote_addr)
return render_template(
"index.html",
content={
"link": next_url(some_hash),
"text": "You're on the right way!"})
评论列表
文章目录