title: How do I include a form into my Django file?
body: <p>I have a form created in mysite/new_player.html. It accepts 3 fields, user_name, real_name, and site_played that correspond to the Player table in the database.</p>
  
  <pre><code>&lt;h1&gt; New Player &lt;/h1&gt;
  {% if error_message %}&lt;p&gt;&lt;strong&gt;{{ error_message }}&lt;/strong&gt;&lt;/p&gt;{% endif %}
  &lt;form action="/stakeme/new/" method="post"&gt;
  {% csrf_token %}
  User Name: &lt;input type="text" name="user_name" id="user_name"/&gt;&lt;br&gt;
  Real Name: &lt;input type="text" name="real_name" id="real_name"/&gt;&lt;br&gt;
  Site Played: &lt;input type="text" name="site_played" id="site_played"/&gt;&lt;br&gt;&lt;br&gt;
  &lt;input type="submit" value="New Player" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am stuck on how to add this to my mysite/views.py file. I have gone through the polls tutorial, but the only form that is used in the tutorial is a multiple choice "choice" of the "poll" and I can't seem to adapt that to text fields.</p>
  
  <pre><code>def new_player(request):
      return render_to_response('stakeme/new_player.html',
                             context_instance=RequestContext(request))
  </code></pre>
  
  <p>So as I understand it, I would need to create something like <code>def add(request): return render_to_response('stakeme/new/'.. etc</code> and add the POST data in here, but that's where I am lost. I am not sure how to get the data into the database.</p>
  
  <p>I am reading the Django docs, but I feel like I am just compounding something that I do not understand. If someone could point me in the right direction, I would really appreciate it.</p>