code: def allow(self, comment, content_object, request):
          
          
          POST = urlencode({
                  "blog": settings.AKISMET_BLOG.encode("utf-8"),
                  "user_ip": comment.ip_address,
                  "user_agent": request.META.get('HTTP_USER_AGENT', "").
                                                  encode("utf-8"),
                  "referrer": request.META.get('HTTP_REFERRER', "").
                                                  encode("utf-8"),
                  "comment_author": comment.user_name.encode("utf-8"),
                  "comment_author_email": comment.user_email.encode("utf-8"),
                  "comment_author_url": comment.user_url.encode("utf-8"),
                  "comment_content": comment.comment.encode("utf-8")})
          connection = HTTPConnection(AKISMET_URL, AKISMET_PORT)
          connection.request("POST", AKISMET_PATH, POST,
                             {"User-Agent": AKISMET_USERAGENT,
                              "Content-type":"application/x-www-form-urlencoded"
                              })
          response = connection.getresponse()
          status, result = response.status, response.read()
          if result == "false":
              return True
          elif result == "true" and settings.DISCARD_SPAM:
              return False
          elif result == "true":
              comment.is_removed = True
              comment.is_public = False
              return True
          else:
              raise AkismetError(status, result)
docs: Moderates comments.