title: Django contact form on homepage
body: <p>I need to embed a contact form at the bottom of my homepage, which is a single page application. I followed several tutorials on how to create my own contact form on another page (e.g., myportfolio.com/contact) which were successful. Unfortunately I haven't been able to adapt those results or find other tutorials on how to make that contact form visible and functional on the same page all of my other model data is displayed (e.g., myportfolio.com).</p>
  
  <p>I followed this tutorial: <a href="https://atsoftware.de/2015/02/django-contact-form-full-tutorial-custom-example-in-django-1-7" rel="nofollow noreferrer">https://atsoftware.de/2015/02/django-contact-form-full-tutorial-custom-example-in-django-1-7</a>. I've only created one application.</p>
  
  <p>I feel like this should be a very common thing to want to do, which makes me think I'm overlooking something glaringly obvious.</p>
  
  <p><strong>views.py in application</strong></p>
  
  <pre><code>from django.views.generic import TemplateView
  from portfolio.models import Experience
  
  class HomePage(TemplateView):
      template_name = 'portfolio/base.html'
  
      def get_context_data(self, *args, **kwargs):
          context = super(HomePage, self).get_context_data(*args, **kwargs)
          context['experience_list'] = Experience.objects.order_by('-start_date')
  
          return context
  </code></pre>
  
  <p><strong>contact_form.html</strong></p>
  
  <pre><code>{% extends 'portfolio/base.html' %}
  
  {% block contact %}
  
    &lt;form method="post"&gt;
      {% csrf_token %}
      {{ form.as_p }}
      &lt;input type="submit" value="Submit"&gt;
    &lt;/form&gt;
  
  {% endblock %}
  </code></pre>
  
  <p>Now contact_form.html goes into the portfolio/base.html like this:</p>
  
  <p><strong>base.html</strong></p>
  
  <pre><code>{# {% include "contact_form/contact_form.html" %}#}
  {% block contact %}{% endblock %}
  </code></pre>
  
  <p>In this scenario, nothing shows up. However, if I comment out the second line and remove the comments from the first line, the submit button appears.</p>
  
  <p>Now I realize I'm assuming django-contact-form is going to pick up this form and know what to do with it like when it was accessible in the myportflio.com/contact scenario. However, I know that there used to be a reference to /contact via the urls.py file before, but in the case of embedding into the base.html file, there is not longer a reference.</p>
  
  <p>Can I add the form some way in the HompePage view similar to adding model data to the context?</p>