""" Plugin to test the nospam.py plugin. To install: 1) Put test_nospam.py in your plugin directory. 2) In config.py add test_nospam to py['load_plugins'] Then hit http://yourdomain.com/weblog/test_nospam with a browser. """ from nospam import _generateImage _template = """
%(test_nospam_message)s
Note: This only tests the generation of the image itself.
You'll still have to make sure that the comment plugin is installed and configured properly.
You entered: %s
" % test_nospam_number else: test_nospam_message = "" result = _template % {"base_url": config["base_url"], "test_nospam_message": test_nospam_message, "test_nospam_number": test_nospam_number} response = request.getResponse() response.addHeader("Content-type", "text/html") response.addHeader("Content-length", "%d" % len(result)) response.write(result) # return True to tell pyblosxom that the request has been taken care of return 1