title: Django - adding google recaptcha v2 to login form
body: <p>I'm triying to add Recaptcha to my login form in Django. I tried different libraries but none of them seems to work, since the captcha form just doesn't appear in my template.</p>
  
  <p>Here is my current work:</p>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>path(r'captcha/', include('captcha.urls'))
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class NewUserForm(UserCreationForm):
      email = forms.EmailField(required=True)
  
      class YourForm(forms.Form):
          captcha = CaptchaField()
  
      class Meta:
          model = User
          fields = ("username", "email", "password1", "password2")
  
      def save(self, commit=True):
          user = super(NewUserForm, self).save(commit=False)
          user.email = self.cleaned_data['email']
          if commit:
              user.save()
          return user
  </code></pre>
  
  <p>And here is my <strong>login.html</strong> template</p>
  
  <pre><code>&lt;form action="/your-name/" method="post"&gt;
     {% csrf_token %}
     {{ form.captcha }}
     &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In this case, only the <code>Submit</code> button will appear, but not the <code>captcha</code> form. This is what happened with any other library I tried. Can anyone give me some help? Thanks in advance!</p>