title: How do you link form action to a view method?
body: <p>In my rendered <code>index.html</code>, I have:</p>
  <pre><code>&lt;form action=&quot;???&quot; method=&quot;post&quot;&gt;
       {% csrf_token %}
       {{ form }}
       &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p>In my <code>views.py</code>, I have:</p>
  <pre><code>class weather(base.TemplateView):
      # Generates the above html
  
  def get_hours(request):
       # do something with request.Post
       return shortcuts.render(request, &quot;index.html&quot;, {&quot;form&quot;: form})
  </code></pre>
  <p>How do I make the form action call the <code>get_hours</code>? I want to post to the same page the form is on so the page won't refresh and will display the results on the same page.</p>