title: Django: calling view function without url mapping
body: <p>How do I pass information from an HTML form to my Python code, without having to specify a url mapping? For example, the following code sends data from the form in my 'index.html' template, to the 'myview' mapping, which then calls the 'myview' view function, which finally renders the 'mypage' template...</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;form method="get" action="{% url 'myview' %}"&gt;
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>urlpatterns = patterns('',
  url(r'^mypage/$', views.myview, name='myview'),
  )
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def myview(request):
      return render(request, 'myapp/mypage.html')
  </code></pre>
  
  <p>However, do I really have to have a url mapping for this? What if I do not want to reload another webpage, and I just want to stay in the same 'index.html' page?</p>
  
  <p>I'm just a little confused over how views are actually called, in the case when I want the view to act more like a traditional function, to process some data, rather than to necessarily render a new template.</p>
  
  <p>Thank you!</p>