]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/blob - search-tags.py
Report error if required parameter 'q' is missing
[phdru.name/cgi-bin/blog-ru/search-tags.git] / search-tags.py
1 #! /usr/bin/env python
2 """Search tags CGI"""
3
4 __author__ = "Oleg Broytman <phd@phdru.name>"
5 __copyright__ = "Copyright (C) 2014 PhiloSoft Design"
6 __license__ = "GNU GPL"
7
8 import cgi
9 from parse_query import parser
10 from html.response import response
11
12 form = cgi.FieldStorage()
13 if not form.has_key('q'):
14     status = "400 Bad request"
15     title = "Error!"
16     body = "Required parameter is missing!"
17
18 response(title, body, status)