title: Django Saving Data into Database
body: <p>I'm having an issue, what I need is to save a part number into a database table. So everytime a user enters the SOSS it should be save in my table. This is my code but is not saving anything, not sure what I'm doing wrong.</p>
  
  <p><strong>manifiestos.html</strong></p>
  
  <pre><code>                                            &lt;form action="{%  url 'manifiestos' %}" method="post"&gt; {% csrf_token %}
                                                  &lt;p&gt;&lt;label for="date"&gt; Date:&lt;/label&gt; &lt;input type="text" name="date" value={% now "Y-m-d" %} /&gt; &lt;/p&gt;
                                                  &lt;p&gt;&lt;label for="soss"&gt; SOSS:&lt;/label&gt; &lt;input type="text" name="soss" id="soss" /&gt; &lt;/p&gt;
                                                  &lt;input type="submit" value="Submit" /&gt;
                                          &lt;/form&gt;
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class manifiestos_bts(models.Model):
      soss = models.CharField(max_length=50)
      date = models.DateTimeField(null=True, blank=True)
      user = models.CharField(max_length=50)
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class ManifiestosForm(forms.Form):
      soss = forms.CharField()
      date = forms.DateTimeField()
      user = forms.CharField()
  </code></pre>
  
  <p><strong>html_views</strong></p>
  
  <pre><code>@login_required(login_url='/msr/login')
  def manifiestos(request):
      if request.method == 'POST':
  
          form = ManifiestosForm(request.POST)
          if form.is_valid():
              soss = request.POST.get('soss', '')
              date = request.POST.get('date', '')
              manifiestos_obj = manifiestos_bts(soss= soss, date= date)
              manifiestos_obj.save()
  
              return  HttpResponseRedirect(reverse('manifiestos'))
      else:
          form = ManifiestosForm()
  
      return render(request, 'manifiestos.html', {'form': form})
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>    url(r'^manifiestos$', html_views.manifiestos, name='manifiestos'),
  </code></pre>
  
  <p>Thanks for your time :)
  If you need more details just let me know.</p>