title: Are You Human And Django HTML
body: <p>I am trying to get AreYouAHuman capcha on my website,
  I mostly got it working the problem is nothing shows up.</p>
  
  <p>this is part of the render'd html</p>
  
  <pre><code>   &lt;label for="id_session_secret"&gt;Are You Human&lt;/label&gt; 
              &lt;br&gt;
              &amp;lt;div id=&amp;quot;AYAH&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://ws.areyouahuman.com/ws/script/87e31f12336132203bdde2da8c93269fccdd5f52&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
              &lt;p&gt;&lt;/p&gt;
  </code></pre>
  
  <p>and this is what i see in the browser</p>
  
  <pre><code>&gt; Are You Human  &lt;div id="AYAH"&gt;&lt;/div&gt;&lt;script type="text/javascript"
  &gt; src="https://ws.areyouahuman.com/ws/script/87e31f12336132203bdde2da8c93269fccdd5f52"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is my Implementation</p>
  
  <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*-
  #
  #  turtle.forms.py
  #  
  #  Copyright 2013 Brian Scott Carpenter &lt;talisman@talisman-Pangolin-Performance&gt;
  
  from django import forms
  from django.conf import settings
  
  import ayah
  ayah.configure(
      settings.AREYOUHUMAN_PUBLISHER_KEY,
      settings.AREYOUHUMAN_SCORING_KEY,
  )
  
  from django.forms import Field, ValidationError, Form
  from django.forms.widgets import Widget
  
  
  #Create a wdiget that renders the AreYouHuman html
  class AreYouHumanWidget(Widget):
  
      def render(self, name, value, attrs=None):
          return ayah.get_publisher_html()
  
  
  #AreYouHuman uses a test field (session_secret) for validation
  class AreYouHumanField(Field):
  
      #Use the AreYouHuman HTML
      widget = AreYouHumanWidget
  
      #Validate agianst AreYouHuman
      def validate(self, value):
          if not ayah.score_result(value):
              raise ValidationError("You may not be human.")
  
  
  
  
  class Turtle_Form(forms.ModelForm):
      ''' This is code to make sure the User automatically saves the
      user to the database in context.
      '''
      session_secret = AreYouHumanField(label="Are You Human")
  
      def save(self, *args, **kwargs):
          kwargs['commit']=False
          obj = super(Turtle_Form, self).save(*args, **kwargs)
          if self.request:
              obj.user = self.request.user
              obj.save()
          return obj #&lt;--- Return saved object to caller.
  
      def __init__(self, *args, **kwargs):
          self.request = kwargs.pop('request', None)
          return super(Turtle_Form, self).__init__(*args, **kwargs)
  </code></pre>
  
  <p>the template looks like</p>
  
  <pre><code>{% extends "base.html" %}
  {% load i18n zinnia_tags %}
  {% load url from future %}
  {% block title %}tempilo.org{% endblock %}
  
  {% block content %}
  &lt;form action="" method="post"&gt;{% csrf_token %}
      {% for field in form %}
          &lt;div class="fieldWrapper"&gt;
              {{ field.errors }}
              {{ field.label_tag }} 
              &lt;br&gt;
              {{ field | safe }}
              &lt;p&gt;&lt;/p&gt;
  
          &lt;/div&gt;
      {% endfor %}
      &lt;p&gt;&lt;input type="submit" value="Save" /&gt;&lt;/p&gt;
  &lt;/form&gt;
  
  {% endblock %}
  </code></pre>