title: Data from django form is not being posted in Postgressql Database despite getting 200 OK from the server
body: <p>I am using Django version 3.0 to create a sign up application for various departments at my school. I have connected the form to a model and the model is stored in a postgressql database. After I start the server using python manage.py runserver and I complete the form and click save, the form refreshes and I get the OK HTTP Code 200 from the server accessed through the terminal, but when I query the postgressql database using pg Admin interface the data has not been stored. Can anyone see where I am going wrong? This process worked before, I'm not sure if the data is just being stored in another table. Please help out if you can.</p>
  <p>This is my base.html file:</p>
  <pre><code>{% load static %}
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Signup Prototype&lt;/title&gt;
          &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css&quot; integrity=&quot;sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2&quot; crossorigin=&quot;anonymous&quot;&gt;
          &lt;link href='//fonts.googleapis.com/css?family=Lobster&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css'&gt;
          &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;script src=&quot;{% static 'js/jquery.js' %}&quot;&gt;&lt;/script&gt;
          &lt;link rel=&quot;stylesheet&quot; href=&quot;{% static 'css/bootstrap.css' %}&quot;&gt;
          &lt;script src=&quot;{% static 'js/bootstrap.js' %}&quot;&gt;&lt;/script&gt;
          &lt;link type=&quot;text/css&quot; href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/redmond/jquery-ui.css&quot; rel=&quot;Stylesheet&quot; /&gt;
          &lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
          &lt;script type=&quot;text/javascript&quot;&gt;
            $(function(){
              $(&quot;#id_date&quot;).datepicker();
            });
          &lt;/script&gt;
  
          {{form.media}}
  
      &lt;/head&gt;
      &lt;body&gt;
          &lt;header class=&quot;page-header&quot;&gt;
              &lt;div class=&quot;container&quot;&gt;
                  &lt;a href=&quot;{% url 'Engineering' %}&quot; class=&quot;top-menu&quot;&gt;
                  &lt;/a&gt;
                  &lt;h1&gt;&lt;a href=&quot;/&quot;&gt;Signup &lt;/a&gt;&lt;/h1&gt;
              &lt;/div&gt;
          &lt;/header&gt;
          &lt;main class=&quot;content container&quot;&gt;
              &lt;div class=&quot;row&quot;&gt;
                  &lt;div class=&quot;col&quot;&gt;
                      {% block content %}
                      {% endblock %}
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/main&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>This is my engineering.html file that displays the form</p>
  <pre><code>&lt;html&gt; 
  {% extends 'base.html' %}
  {% load static %}
  {% block content %}
     &lt;h2&gt;Engineering&lt;/h2&gt;
     &lt;form method=&quot;POST&quot; class=&quot;engineering-form&quot;&gt;{% csrf_token %}
         {{ form.as_p }}
         &lt;button type=&quot;submit&quot; class=&quot;save btn btn-default&quot;&gt;Save&lt;/button&gt;
     &lt;/form&gt;
  {% endblock %}
  &lt;html&gt;
  
  </code></pre>
  <p>This is my .views file:</p>
  <pre><code>from django.shortcuts import render
  from .forms import Engineering
  
  def engineering(request):
      form = Engineering()
      return render(request, 'my_app/engineering.html', {'form': form})
  
  </code></pre>
  <p>This is my form</p>
  <pre><code>class Engineering(forms.ModelForm):
      name = forms.CharField(label=&quot;Name&quot;)
      etoken_user = forms.BooleanField(required = False, label=&quot;Etoken Use&quot;)
      mfa_use = forms.BooleanField(required = False, label=&quot;MFA Use&quot;)
      usage_type = forms.CharField(label=&quot;Usage Type&quot;)
      email = forms.EmailField(label=&quot;Email&quot;)
      user_id = forms.CharField(label=&quot;USERid&quot;)
      date = forms.DateTimeField(label=&quot;Date&quot;) # date just time stamp the date they are using
  
      class Meta: #tells django which model should be used to create the form
          model = Engineering
          fields = ('name','etoken_user', 'mfa_use','usage_type','email','user_id','date')
          widgets = {
          'datetime':DateTimeWidget(attrs={'id':'UTC' },usel10n=True, bootstrap_version=4)
          }
  </code></pre>
  <p>this is the model</p>
  <pre><code>class Engineering(models.Model):
      user_name     = models.CharField(max_length = 100)
      etoken_use    = models.BooleanField()
      mfa_use       = models.BooleanField()
      usage_type    = models.CharField(max_length = 100)
      date_recorded = models.DateTimeField(auto_now_add = True)
      email         = models.EmailField(max_length = 150)
      user_id       = models.CharField(max_length = 20)
  </code></pre>